First time here? Check out the FAQ!

Revision history  [back]

Why cache within the object?

Hi

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

# post.py
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

Thanks!