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
|
|
@ -159,14 +159,23 @@ DATABASES = {
|
|||
'HOST':'',
|
||||
'PORT':''
|
||||
}}
|
||||
# Engine Config style for Django versions < 1.2 only. See above.
|
||||
DATABASE_ENGINE = 'sqlite3'
|
||||
DATABASE_NAME = os.path.join(GAME_DIR, 'evennia.db3')
|
||||
DATABASE_USER = ''
|
||||
DATABASE_PASSWORD = ''
|
||||
DATABASE_HOST = ''
|
||||
DATABASE_PORT = ''
|
||||
|
||||
# This manages the object-level caches. Evennia will agressively cache
|
||||
# fields, properties and attribute lookup. Evennia uses a fast and
|
||||
# local in-memory cache by default. If a Memcached server is available
|
||||
# it can be used instead (see django docs). Cache performance can be
|
||||
# tweaked by adding options to each cache. Finally, any cache can
|
||||
# be completely turned off by pointing its backend
|
||||
# to 'django.core.cache.backends.dummy.DummyCache'.
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'},
|
||||
'field_cache': {
|
||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'},
|
||||
'prop_cache': {
|
||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'},
|
||||
'attr_cache': {
|
||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'},
|
||||
}
|
||||
######################################################################
|
||||
# Evennia pluggable modules
|
||||
######################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue