Johnny cache not invalidating

This initialization occurs in the get_query_set() method of the Cached Manager.

You may also set the default timeout for the Query Set in this method, which is something that we have also taken advantage of on a per model basis.

johnny cache not invalidating-40johnny cache not invalidating-67

The big difference is that Query Set class only conditionally hits the cache.At Yipit, our data has variable time sensitivity and expense of retrieval.We wanted the flexibility to pick and choose which models to cache (as well as the duration for each).While generally an awesome feature, this makes intelligent invalidation critical.To ensure that cached Query Sets represent (mostly) consistent views of the underlying model data, Cache Machine ties each cache key to a flush list of associated objects, including Foreign Key relations.

Leave a Reply