Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 563 Bytes

class-memcached-engine.md

File metadata and controls

34 lines (22 loc) · 563 Bytes

Class MemcachedEngine

This class uses the Memcached as the cache engine.

Defining the Servers

The constructor expects an array of servers. Each server is an item in the array with the following format:

$servers = [
    'localhost:11211',
]

PSR-16 Constructor

$cache = new \ByJG\Cache\Psr16\MemcachedEngine($servers)

PSR-6 Constructor

$cachePool = \ByJG\Cache\Factory::createMemcachedPool($servers)

or

$cachePool = new \ByJG\Cache\Psr6\CachePool(new \ByJG\Cache\Psr16\MemcachedEngine($servers));