Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
When invalidating memcache, also invalidate the cache for dart
Browse files Browse the repository at this point in the history
R=sgjesse@google.com

Review URL: https://chromiumcodereview.appspot.com//952503002
  • Loading branch information
mkustermann committed Feb 24, 2015
1 parent 63e3556 commit fb70644
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/app.yaml
Expand Up @@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE file.

application: dartlang-pub
version: 32
version: 33
runtime: python27
threadsafe: true
api_version: 1
Expand Down
6 changes: 6 additions & 0 deletions app/models/package.py
Expand Up @@ -226,8 +226,14 @@ def invalidate_cache(self):
of the package are uploaded, the data will change.
"""
memcache.delete(self._package_json_cache_key)
memcache.delete(self._dart_package_json_cache_key)

@property
def _package_json_cache_key(self):
"""The memcache key for the cached JSON for this package."""
return 'package_json_' + self.name

@property
def _dart_package_json_cache_key(self):
"""The Dart memcache key for the cached JSON for this package."""
return 'dart_package_json_' + self.name

0 comments on commit fb70644

Please sign in to comment.