Classes

Class Cache

Cache provides a consistent interface to Caching in your application. It allows you
to use several different Cache engines, without coupling your application to a specific
implementation. It also allows you to change out cache storage or configuration without effecting
the rest of your application.

You can configure Cache engines in your application's bootstrap.php file. A sample configuration would
be

This would configure an APC cache engine to the 'shared' alias. You could then read and write
to that cache alias by using it for the $config parameter in the various Cache methods. In
general all Cache operations are supported by all cache engines. However, Cache::increment() and
Cache::decrement() are not supported by File caching.

Check if Cache has initialized a working config for the given name.

Read a key from the cache. Will automatically use the currently
active cache configuration. To set the currently active configuration use
Cache::config()

Temporarily change the settings on a cache config. The settings will persist for the next write
operation (write, decrement, increment, clear). Any reads that are done before the write, will
use the modified settings. If $settings is empty, the settings will be reset to the
original configuration.

Temporarily change the settings on a cache config. The settings will persist for the next write
operation (write, decrement, increment, clear). Any reads that are done before the write, will
use the modified settings. If $settings is empty, the settings will be reset to the
original configuration.