mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 10:16:32 +01:00
Remove confusing contents-cache error. Resolves #1169
This commit is contained in:
parent
2a79f623c4
commit
cc354cc223
1 changed files with 4 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ from evennia.utils import logger
|
|||
from evennia.utils.utils import make_iter, dbref, lazy_property
|
||||
|
||||
|
||||
class ContentsHandler(object):
|
||||
class ContentsHandler:
|
||||
"""
|
||||
Handles and caches the contents of an object to avoid excessive
|
||||
lookups (this is done very often due to cmdhandler needing to look
|
||||
|
|
@ -79,8 +79,9 @@ class ContentsHandler(object):
|
|||
try:
|
||||
return [self._idcache[pk] for pk in pks]
|
||||
except KeyError:
|
||||
# this means an actual failure of caching. Return real database match.
|
||||
logger.log_err("contents cache failed for %s." % self.obj.key)
|
||||
# this means the central instance_cache was totally flushed.
|
||||
# Re-fetching from database will rebuild the necessary parts of the cache
|
||||
# for next fetch.
|
||||
return list(ObjectDB.objects.filter(db_location=self.obj))
|
||||
|
||||
def add(self, obj):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue