mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 07:27:17 +02:00
Changed cache system to use Django's cache mechanism. Changed field caches to make use of Django signalling instead of custom caching calls (this should make the system consistent also when called from the webserver). Created a wrapper system for easily wrapping fields with a default wrapper (so as to not have to explicitly define the properties (such as objdb.key) which all just do the same thing - load from the field and make sure to call save().
This commit is contained in:
parent
deafb9c544
commit
8202dba596
5 changed files with 490 additions and 334 deletions
|
|
@ -30,6 +30,12 @@ from src.utils.utils import get_evennia_version, mod_import, make_iter
|
|||
from src.comms import channelhandler
|
||||
from src.server.sessionhandler import SESSIONS
|
||||
|
||||
# setting up server-side field cache
|
||||
|
||||
from django.db.models.signals import pre_save
|
||||
from src.server.caches import field_pre_save
|
||||
pre_save.connect(field_pre_save, dispatch_uid="fieldcache")
|
||||
|
||||
_SA = object.__setattr__
|
||||
|
||||
if os.name == 'nt':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue