Put up a warning about not using BaseObject.at_init() at this time (it's not called, as per issue 188). Also removed the deprecated at_cache() hook (it doesn't work anymore now that the caching system is much more efficient and only caches once).

This commit is contained in:
Griatch 2011-09-15 10:46:41 +02:00
parent f1d743f14c
commit 1995f61d46
5 changed files with 18 additions and 23 deletions

View file

@ -101,15 +101,6 @@ class SharedMemoryModel(Model):
"""
if instance._get_pk_val() is not None:
cls.__instance_cache__[instance._get_pk_val()] = instance
try:
object.__getattribute__(instance, "at_cache")()
except (TypeError, AttributeError), e:
#print e, instance._get_pk_val()
pass
#key = "%s-%s" % (cls, instance.pk)
#TCACHE[key] = instance
#print "cached: %s (%s: %s) (total cached: %s)" % (instance, cls.__name__, len(cls.__instance_cache__), len(TCACHE))
cache_instance = classmethod(cache_instance)
def get_all_cached_instances(cls):