4 ms·
Thanks, I'll check that out. How does it compare to johnny-cache, which is what I've been using? It has the advantage for me that I only need to include it in
by rfurmani 14y ago
Thanks, I'll check that out. How does it compare to johnny-cache, which is what I've been using? It has the advantage for me that I only need to include it in settings.py, and I don't need to manually plug in a manager into my models, so it's easy to enable and disable for testing. Also, it has support for different caching backends, so I can have multiple django instances using a common memcache for the models even if the models are highly mutable.
- yummyfajitas 14y agoWell, I'm not very familiar with johnny-cache, so I don't want to say a lot. It's quite possible that it does everything guacamole does and more. The point of guacamole is that you probably don't want to cache every database read. You probably just want to cache a few models. I.e., if your database has 1 million items (which are frequently updated) and 1000 brands (which are more or less static), you probably want to cache those 1000 brands but not the million items. Once you've done that, actions like {% for item in items %} {{ item.brand.name}} {% endfor %} no longer involve sending 50 queries to the db. (Or even to memcached - 50 hits to memcached can still be 25-50ms.) Guacamole doesn't support other cache backends, though that would be pretty easy to add.