Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why cache within the object?


It seems that some cacheable content is cached within the object rather than in the cache system - why's that? For instance:

def set_cached_comments(self, comments):
    """caches comments in the lifetime of the object
    does not talk to the actual cache system
    self._cached_comments = comments