mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 16:26:30 +01:00
Further migrated script caches to the central cache location, removing old cruft.
This commit is contained in:
parent
98d0eb7869
commit
8654d8cc48
3 changed files with 17 additions and 41 deletions
|
|
@ -59,38 +59,6 @@ _DA = object.__delattr__
|
|||
_PLOADS = pickle.loads
|
||||
_PDUMPS = pickle.dumps
|
||||
|
||||
|
||||
# Property Cache mechanism.
|
||||
|
||||
#def _get_cache(obj, name):
|
||||
# "On-model Cache handler."
|
||||
# try:
|
||||
# return _GA(obj, "_cached_db_%s" % name)
|
||||
# except AttributeError:
|
||||
# val = _GA(obj, "db_%s" % name)
|
||||
# _SA(obj, "_cached_db_%s" % name, val)
|
||||
# return val
|
||||
#def set_prop_cache(obj, name, val):
|
||||
# "On-model Cache setter. Also updates database."
|
||||
# _SA(obj, "db_%s" % name, val)
|
||||
# _GA(obj, "save")()
|
||||
# _SA(obj, "_cached_db_%s" % name, val)
|
||||
#def del_prop_cache(obj, name):
|
||||
# "On-model cache deleter"
|
||||
# try:
|
||||
# _DA(obj, "_cached_db_%s" % name)
|
||||
# except AttributeError:
|
||||
# pass
|
||||
#def _clean_cache(obj):
|
||||
# "On-model cache resetter"
|
||||
# [_DA(obj, cname) for cname in obj.__dict__.keys() if cname.startswith("_cached_db_")]
|
||||
|
||||
|
||||
# this cache holds the attributes loaded on objects, one dictionary
|
||||
# of attributes per object.
|
||||
_ATTRIBUTE_CACHE = defaultdict(dict)
|
||||
|
||||
|
||||
#------------------------------------------------------------
|
||||
#
|
||||
# Attributes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue