Caching

Introduction to the Cache Interface

Cement defines a Cache Interface, but does not implement caching by default.

Cement Extensions That Provide Cache Handlers:

API References:

Configuration

Application Meta Options

The following options under App.Meta modify configuration handling:

Option

Description

cache_handler

The handler that implements the cache interface.

Working with Caches

The following example uses the Memcached Extension, which requires the pylibmc library to be installed, as well as a Memcached server running on localhost:11211.

Creating a Cache Handler

All interfaces in Cement can be overridden with your own implementation. This can be done either by sub-classing CacheHandler itself, or by sub-classing an existing extension's handlers in order to alter their functionality.

Last updated