Table Of Contents


HTTP Server Cache

CherryPy has a cache filter that implements a HTTP/1.1-compliant server side cache. You can enable it for your application by setting the following configuration option in your application’s config file (app.cfg):

cache_filter.on = True


Side note: In later CherryPy versions (>= 3.0) the cache filter is re-implemented as a tool and the corresponding configuration settings group is called tools.caching

Caching Controller Methods

There’s a Python Cookbook caching decorator for caching method calls.

External Cache

memcached is an external process for caching any kind of data. There is a Python interface available through the python-memcached package.