Application Caching

Caching Methods

$app->getCaching()

Accessing cache service.

/** @var \Zend\Cache\Storage\StorageInterface $cache */
$cache = $app->getCache();

$app->getCache()

Getting cached value.

$myValue = $app->getCache('myCacheKey');

$app->setCache()

Setting value to cache.

$app->setCache('myCacheKey', $myValue);

Cache Config

ConfigCacheEnabled

Toggling application config caching.

use WebinoConfigLib\Feature\ConfigCacheEnabled;

Webino::config([
    // enable
    new ConfigCacheEnabled,
    // disable
    new ConfigCacheEnabled(false),
]);

See also

Caching Methods

FilesystemCache

Configuring filesystem cache.

use WebinoAppLib\Feature\FilesystemCache;

Webino::config([
    new FilesystemCache,
]);

MemoryCache

Configuring in memory cache.

use WebinoAppLib\Feature\MemoryCache;

Webino::config([
    new MemoryCache,
]);