From cc354cc22305aff854c4dd09173c2b84b5923bdb Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 26 Jun 2020 11:37:34 +0200 Subject: [PATCH] Remove confusing contents-cache error. Resolves #1169 --- evennia/objects/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/evennia/objects/models.py b/evennia/objects/models.py index f9e7799d48..fac7194457 100644 --- a/evennia/objects/models.py +++ b/evennia/objects/models.py @@ -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):