mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 07:46:30 +01:00
Added the ability to clean the attribute_cache on a per-object bases using obj.flush_attr_cache().
This commit is contained in:
parent
a8dcfff248
commit
a347252407
1 changed files with 6 additions and 0 deletions
|
|
@ -1614,6 +1614,12 @@ class TypedObject(SharedMemoryModel):
|
|||
if hperm in [p.lower() for p in self.permissions] and hpos > ppos)
|
||||
return False
|
||||
|
||||
def flush_attr_cache(self):
|
||||
"""
|
||||
Flush only the attribute cache for this object.
|
||||
"""
|
||||
_ATTRIBUTE_CACHE[_GA(self, "hashid")] = {}
|
||||
|
||||
def flush_from_cache(self):
|
||||
"""
|
||||
Flush this object instance from cache, forcing an object reload. Note that this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue