fix changeset cache_key
This commit is contained in:
parent
2c053e3d0f
commit
ceafc2e1cb
2 changed files with 2 additions and 3 deletions
|
@ -423,8 +423,7 @@ class ChangeSet(models.Model):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cache_key_by_changes(self):
|
def cache_key_by_changes(self):
|
||||||
return ':'.join(('editor:changeset_view_data', str(self.pk),
|
return ':'.join((str(self.pk), MapUpdate.cache_key(), self.last_change_cache_key))
|
||||||
MapUpdate.cache_key(), self.last_change_cache_key))
|
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
if self.pk is None:
|
if self.pk is None:
|
||||||
|
|
|
@ -170,7 +170,7 @@ def changeset_detail(request, pk):
|
||||||
'active': active,
|
'active': active,
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_key = changeset.cache_key_by_changes
|
cache_key = 'editor:changeset_view_data:'+changeset.cache_key_by_changes
|
||||||
changed_objects_data = cache.get(cache_key)
|
changed_objects_data = cache.get(cache_key)
|
||||||
if changed_objects_data:
|
if changed_objects_data:
|
||||||
ctx['changed_objects'] = changed_objects_data
|
ctx['changed_objects'] = changed_objects_data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue