summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.txt2
-rw-r--r--pylru.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/README.txt b/README.txt
index 7f77865..48a655c 100644
--- a/README.txt
+++ b/README.txt
@@ -209,5 +209,7 @@ PyLRU also provides a function decorator::
return x*x
# Now results of the square function are cached for future lookup.
+ # You can get full access to cache via square.cache .
+
diff --git a/pylru.py b/pylru.py
index 28d55d5..a6fce0f 100644
--- a/pylru.py
+++ b/pylru.py
@@ -529,4 +529,5 @@ class lrudecorator(object):
value = func(*args, **kwargs)
self.cache[key] = value
return value
+ wrapped.cache = self.cache
return wrapped