summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pylru.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pylru.py b/pylru.py
index 5cb4130..eef0593 100644
--- a/pylru.py
+++ b/pylru.py
@@ -531,10 +531,12 @@ def lruwrap(store, size, writeback=False):
else:
return WriteThroughCacheManager(store, size)
+import functools
class lrudecorator(object):
def __init__(self, size):
self.size = size
def __call__(self, func):
- return FunctionCacheManager(func, self.size)
+ wrapper = FunctionCacheManager(func, self.size)
+ return functools.update_wrapper(wrapper, func)