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

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

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: rebase-update Created 4 years, 3 months 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/gitiles/cache_decorator.py
diff --git a/appengine/findit/common/cache_decorator.py b/appengine/findit/gitiles/cache_decorator.py
similarity index 93%
rename from appengine/findit/common/cache_decorator.py
rename to appengine/findit/gitiles/cache_decorator.py
index 6f1bb1efe42dc866aa7841e4df8eb84db698f26f..e72c314d63c94b286155df9b9ad00e5891b82243 100644
--- a/appengine/findit/common/cache_decorator.py
+++ b/appengine/findit/gitiles/cache_decorator.py
@@ -2,6 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# TODO(wrengr): this is the only file in the findit/repository directory
+# that depends on appengine, and the only thing that depends on this
+# file is git_repository.py. Ideally we want to break that dependency
+# by offering a non-cached version of GitRepository as part of the core
+# library, with the cached version as a subclass in some appengine_utils
+# directory. (This is an example of why all the Findit-as-a-library's
+# clients shoudln't be put in a directory called "handlers", since this
+# file isn't a handler.
+
"""This module provides a decorator to cache the results of a function.
Examples:

Powered by Google App Engine
This is Rietveld 408576698