Fixed cache issues with @type and @name commands that didn't properly update the cache when using them.

This commit is contained in:
Griatch 2012-03-13 01:37:28 +01:00
parent 309c03ce43
commit ca280af659

View file

@ -724,7 +724,7 @@ class TypedObject(SharedMemoryModel):
#@name.setter
def name_set(self, value):
"Setter. Allows for self.name = value"
set_cache(self, "name", value)
set_cache(self, "key", value)
#@name.deleter
def name_del(self):
"Deleter. Allows for del self.name"
@ -1093,9 +1093,10 @@ class TypedObject(SharedMemoryModel):
# this will automatically use a default class if
# there is an error with the given typeclass.
new_typeclass = self.typeclass
print "new_typeclass:",new_typeclass.path, self.typeclass_path
if self.typeclass_path == new_typeclass.path:
# the typeclass loading worked as expected
SA(self, "_cached_db_typeclass_path", None)
DA(self, "_cached_db_typeclass_path")
SA(self, "_cached_typeclass", None)
elif no_default:
# something went wrong; the default was loaded instead,