Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 741 Bytes

class-shmop-cache-engine.md

File metadata and controls

38 lines (24 loc) · 741 Bytes

Class ShmopCacheEngine

This class uses the PHP Shmop as the cache engine.

The Shared memory allows multiple processes to access the same data in memory. You can use it to share data among running PHP scripts in the same server.

Configuration

These are the default values for the configuration:

$config = [
    'max-size' => 524288, // 512Kb
    'default-permission' = > '0700', 
];

PSR-16 Constructor

$cache = new \ByJG\Cache\Psr16\ShmopCacheEngine($config, $prefix)

PSR-6 Constructor

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

or

$cachePool = new \ByJG\Cache\Psr6\CachePool(new \ByJG\Cache\Psr16\ShmopCacheEngine($config, $prefix));