Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (25 sloc) 1.35 KB


Implements the CacheInteface using memcached <> as the cache backend.

Requires Memcache PECL extension.


__construct($host, $port, $timeout, $compress)
$host:Point to the host where memcache is listening for connections. This parameter may also specify other transports like unix:///path/to/memcache.sock to use UNIX domain sockets - default
$port:Point to the port where memcache is listening for connections - default 11211.
$timeout:Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.
$compress:Enables or disables (true/false) payload compression, Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib) - default false.


.. seealso::

   `Cache Examples <>`_.