High performant and scalable websites require caching. That is why it is built into Bear Framework. The Cache API provides a simple to use methods to store, retrieve and delete data.

use BearFramework\App;

$app App::get();

// Enables a cache driver that will store cache items in the data storage.

// Save something.

// Get something.
echo $app->cache->getValue('key1'); // Will output 'data1'.

// Delete data from the cache

Learn more

Handle HTTP requests
Retrieve information about the HTTP request
Store and retrieve data

The information on this page is created for version 1.1 of Bear Framework and may not be applicable for other versions of the framework.