equal
deleted
inserted
replaced
25 import logging |
25 import logging |
26 |
26 |
27 from google.appengine.api import memcache |
27 from google.appengine.api import memcache |
28 |
28 |
29 from soc.logic import accounts |
29 from soc.logic import accounts |
|
30 from soc.logic import system |
30 |
31 |
31 import soc.cache.base |
32 import soc.cache.base |
32 |
33 |
33 |
34 |
34 def key(entity): |
35 def key(entity): |
35 """Returns the memcache key for an entities homepage. |
36 """Returns the memcache key for an entities homepage. |
36 """ |
37 """ |
37 |
38 |
38 return 'homepage_for_%s_%s' % (entity.kind(), entity.key().id_or_name()) |
39 host = system.getHostname() |
|
40 version = system.getAppVersion() |
|
41 kind = entity.kind() |
|
42 key = entity.key().id_or_name() |
|
43 |
|
44 return 'homepage_for_%s_%s_%s_%s' % (host, version, kind, key) |
39 |
45 |
40 |
46 |
41 def get(self, *args, **kwargs): |
47 def get(self, *args, **kwargs): |
42 """Retrieves the homepage for the specified entity from the memcache. |
48 """Retrieves the homepage for the specified entity from the memcache. |
43 """ |
49 """ |