A good way to build a usable instance of a
Zend_Cache Frontend is
given in the following example :
// We choose a backend (for example 'File' or 'Sqlite'...)
$backendName = '[...]';
// We choose a frontend (for example 'Core', 'Output', 'Page'...)
$frontendName = '[...]';
// We set an array of options for the chosen frontend
$frontendOptions = array([...]);
// We set an array of options for the chosen backend
$backendOptions = array([...]);
// We create an instance of Zend_Cache
// (of course, the two last arguments are optional)
$cache = Zend_Cache::factory($frontendName,
In the following examples we will assume that the
holds a valid, instantiated frontend as shown and that you understand how to pass
parameters to your chosen backends.
Zend_Cache::factory() to get frontend instances.
Instantiating frontends and backends yourself will not work as expected.