Permalink
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

Memcache

Implements the CacheInteface using memcached <http://memcached.org> as the cache backend.

Requires Memcache PECL extension.

__construct

__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 127.0.0.1.
$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.

Example

.. seealso::

   `Cache Examples <https://github.com/nbari/DALMP/tree/master/examples/cache>`_.