OLD | NEW |
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import cgi | 5 import cgi |
6 import json | 6 import json |
7 import logging | 7 import logging |
8 | 8 |
9 from google.appengine.api import memcache | 9 from google.appengine.api import memcache |
10 from google.appengine.api import users | 10 from google.appengine.api import users |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 description of the package changes. This isn't often since most package | 225 description of the package changes. This isn't often since most package |
226 data is immutable, but when the uploader list changes or new versions | 226 data is immutable, but when the uploader list changes or new versions |
227 of the package are uploaded, the data will change. | 227 of the package are uploaded, the data will change. |
228 """ | 228 """ |
229 logging.info("Invalidating memcache keys: %s and %s" | 229 logging.info("Invalidating memcache keys: %s and %s" |
230 % (self._package_json_cache_key, | 230 % (self._package_json_cache_key, |
231 self._dart_package_json_cache_key)) | 231 self._dart_package_json_cache_key)) |
232 | 232 |
233 memcache.delete(self._package_json_cache_key) | 233 memcache.delete(self._package_json_cache_key) |
234 memcache.delete(self._dart_package_json_cache_key) | 234 memcache.delete(self._dart_package_json_cache_key) |
| 235 memcache.delete(self._dart_package_ui_cache_key) |
235 | 236 |
236 @property | 237 @property |
237 def _package_json_cache_key(self): | 238 def _package_json_cache_key(self): |
238 """The memcache key for the cached JSON for this package.""" | 239 """The memcache key for the cached JSON for this package.""" |
239 return 'package_json_' + self.name | 240 return 'package_json_' + self.name |
240 | 241 |
241 @property | 242 @property |
242 def _dart_package_json_cache_key(self): | 243 def _dart_package_json_cache_key(self): |
243 """The Dart memcache key for the cached JSON for this package.""" | 244 """The Dart memcache key for the cached JSON for this package.""" |
244 return 'dart_package_json' + self.name | 245 return 'dart_package_json' + self.name |
| 246 |
| 247 @property |
| 248 def _dart_package_ui_cache_key(self): |
| 249 """The Dart memcache key for the cached UI page for this package.""" |
| 250 return 'dart_package_ui' + self.name |
OLD | NEW |