Kohana Cache configuration 2

APC settings

'apc'      => array
    'driver'             => 'apc',
    'default_expire'     => 3600,

SQLite settings

Kohana Cache configuration 1

Kohana Cache uses configuration groups to create cache instances. A configuration group can use any supported driver, with successive groups using multiple instances of the same driver type.
In cases where only one cache group is required, if the group is named defaultthere is no need to pass the group name when instantiating a cache instance.

Group settings

Below are the default cache configuration groups for each supported driver. Add to- or override these settings within the application/config/cache.php file.

About Kohana Cache

Kohana_Cache provides a common interface to a variety of caching engines.Kohana_Cache_Tagging is supported where available natively to the cache system. Kohana Cache supports multiple instances of cache engines through a grouped singleton pattern.

Supported cache engines

Introduction to caching

Caching should be implemented with consideration. Generally, caching the result of resources is faster than reprocessing them. Choosing what, how and when to cache is vital. PHP APC is one of the fastest caching systems available, closely followed byMemcachedSQLite and File caching are two of the slowest cache methods, however usually faster than reprocessing a complex set of instructions.
Caching engines that use memory are considerably faster than file based alternatives. But memory is limited whereas disk space is plentiful. If caching large datasets, such as large database result sets, it is best to use file caching.

Minimum requirements

  • Kohana 3.0.4
  • PHP 5.2.4 or greater

Pagination Configuration

Pagination uses 6 settings: current_pagetotal_itemsitems_per_pageviewauto_hideand first_page_in_url.

Configuration Examples

This example shows the default configuration:
return array(
    // Application defaults
    'default' => array(
        'current_page'      => array('source' => 'query_string', 'key' => 'page'),  // source: "query_string" or "route"
        'total_items'       => 0,
        'items_per_page'    => 10,
        'view'              => 'pagination/basic',
        'auto_hide'         => TRUE,
        'first_page_in_url' => FALSE,
This is an example with multiple configurations: