optimize traffic for editor geometries / cache objects locally

This commit is contained in:
Laura Klünder 2019-12-10 00:11:59 +01:00
parent 7062a6c446
commit b3f307b9a6
7 changed files with 88 additions and 11 deletions

View file

@ -799,6 +799,12 @@ class ChangeSet(models.Model):
def cache_key_by_changes(self):
return 'editor:changeset:' + self.raw_cache_key_by_changes
@property
def raw_cache_key_without_changes(self):
if self.pk is None:
return MapUpdate.current_cache_key()
return ':'.join((str(self.pk), MapUpdate.current_cache_key()))
@property
def raw_cache_key_by_changes(self):
if self.pk is None: