pythonhttpcachingsquidmod-cache

Cache anonymous HTTP requests (based on cookies)


I would like to add a HTTP (or WSGI) cache to my Python web application, for all requests which

If additional common caching directives (like cache-control: private) or even ETAGS are taken into account it would be nice too, but that is currently not a requirement.

Preferable, I do not want to run any additional piece of software like Squid (but I will use it if there a good reasons to do so), so I will prefer a mod_apache based solution, or even some kind of memcached powered WSGI-Middleware; Other solutions are also welcome.

Many thanks,
Christoph


Solution

  • I'd recommend checking out varnish. It's going to be a lot faster than any WSGI-Middleware you write/find, and you should be able to do everything you want with it. Here's the tutorial for a taste of it's many features, options: http://www.varnish-cache.org/docs/trunk/tutorial/index.html