Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: appengine/findit/lib/cache_decorator.py

Issue 2432203003: [Predator] Run predator. (Closed)
Patch Set: . Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/findit/lib/cache_decorator.py
diff --git a/appengine/findit/lib/cache_decorator.py b/appengine/findit/lib/cache_decorator.py
index 5930787c932401636498a6ea45dd069109cff0bd..6277d7802b2d5c8c37cdf0c21c6a3764a752fc35 100644
--- a/appengine/findit/lib/cache_decorator.py
+++ b/appengine/findit/lib/cache_decorator.py
@@ -48,7 +48,8 @@ import zlib
from google.appengine.api import memcache
-_DEFAULT_LOCAL_CACHE_DIR = os.path.join(os.path.expanduser('~'),
+_PREDATOR_ROOT_DIR = os.path.join(os.path.dirname(__file__), os.path.pardir)
stgao 2016/11/02 01:45:48 not "PREDATOR" here, as this is for general purpos
Sharu Jiang 2016/11/11 23:10:26 Done in rebase.
+_DEFAULT_LOCAL_CACHE_DIR = os.path.join(_PREDATOR_ROOT_DIR,
'.culprit_finder', 'local_cache')
@@ -163,7 +164,7 @@ class LocalCacher(Cacher):
logging.error('Failed loading cache: %s', e)
return None
- def Set(self, key, data): # pylint: disable=W
+ def Set(self, key, data, expire_time=0): # pylint: disable=W
with LocalCacher.lock:
try:
with open(os.path.join(self.cache_dir, key), 'wb') as f:

Powered by Google App Engine
This is Rietveld 408576698