Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 698 Bytes

class-filesystem-cache-engine.md

File metadata and controls

30 lines (18 loc) · 698 Bytes

Class FilesystemCacheEngine

This class uses the Filesystem as the cache engine.

Defining the Path

The FileSystemCacheEngine expects a prefix and a path to store the cache files. The prefix is used to avoid collision between different applications using the same cache path. If the path is not defined, the default is the system temporary path.

PSR-16 Constructor

$cache = new \ByJG\Cache\Psr16\FileSystemCacheEngine($path, $prefix)

PSR-6 Constructor

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

or

$cachePool = new \ByJG\Cache\Psr6\CachePool(new \ByJG\Cache\Psr16\FileSystemCacheEngine($path, $prefix));