Index: appengine/findit_mock/libs/cache/cache.py |
diff --git a/appengine/findit_mock/libs/cache/cache.py b/appengine/findit_mock/libs/cache/cache.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fdcfe0f9b4a147438436e4e3c08d11cc0e4dc901 |
--- /dev/null |
+++ b/appengine/findit_mock/libs/cache/cache.py |
@@ -0,0 +1,13 @@ |
+import functools |
Sharu Jiang
2016/11/04 18:39:46
I think some part of cache is gae related, like *M
stgao
2016/11/08 18:53:32
Yes, that's the plan.
|
+ |
+def Cached(): |
+ def Decorator(func): |
+ """Decorator to cache a function's results.""" |
+ @functools.wraps(func) |
+ def Wrapped(*args, **kwargs): |
+ # TODO: cache result. |
+ return func(*args, **kwargs) |
+ |
+ return Wrapped |
+ |
+ return Decorator |