Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Also consider using Johnny Cache or CacheMachine backed by memcached.

Johnny Cache does automatic invalidation, but will invalidate an entire table's cache on one write. If you have a site with a small number of writes, this is an easy and instant win. Setup is under ten lines of configuration.

CacheMachine, on the other hand, tracks the objects that were returned for individual queries. The queries are invalidated when one of the associated objects changes, but not when a new object is added to the db. I believe addons.mozilla.com uses this.

http://packages.python.org/johnny-cache/

https://github.com/jbalogh/django-cache-machine



I can confirm that CacheMachine is being used by at least 2 global projects that are in production. Haven't faced any critical problems so far.


Correct me if I'm wrong but I don't think Johnny Cache works with Django 1.4 yet.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: