Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 555 Bytes

File metadata and controls

31 lines (19 loc) · 555 Bytes
sidebar_position
8

SessionCacheEngine

This class uses the PHP Session as the cache engine. This will persist the cache between requests while the user session is active.

The cache is not shared between different users.

PSR-16 Constructor

$cache = new \ByJG\Cache\Psr16\SessionCacheEngine($prefix)

PSR-6 Constructor

$cachePool = \ByJG\Cache\Factory::createSessionPool($prefix, $bufferSize = 10)

or

$cachePool = new \ByJG\Cache\Psr6\CachePool(new \ByJG\Cache\Psr16\SessionCacheEngine($prefix));