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:
Griatch 2013-05-29 16:16:28 +02:00
parent deafb9c544
commit 8202dba596
5 changed files with 490 additions and 334 deletions

View file

@ -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':