mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 15:37:17 +02:00
Added cache-cleaning to the idmapper base class. This works to sync most changes from the admin site-side, but not location changes (which leaves the content cache stale). Thinking of testing the django in-built cache framework instead, maybe using custom fields?
This commit is contained in:
parent
0a39b8f65e
commit
deafb9c544
3 changed files with 28 additions and 4 deletions
|
|
@ -210,6 +210,8 @@ def update_cached_instance(sender, instance, **kwargs):
|
|||
if not hasattr(instance, 'cache_instance'):
|
||||
return
|
||||
sender.cache_instance(instance)
|
||||
from src.server.caches import flush_obj_caches
|
||||
flush_obj_caches(instance)
|
||||
post_save.connect(update_cached_instance)
|
||||
|
||||
def cache_size(mb=True):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue