Properties

Properties existing in the Solar_Cache_Adapter_Memcache class.

Public

$memcache

(object) A memcache client object.

Protected

$_Solar_Cache_Adapter

(array) Default configuration values.

Inherited from Solar_Cache_Adapter.

$_Solar_Cache_Adapter_Memcache

(array) Default configuration values.

$_active

(bool) Whether or not the cache is active.

Inherited from Solar_Cache_Adapter.

$_config

(array) Collection point for configuration values.

Inherited from Solar_Base.

Note that you do not define config defaults in $_config directly.

<?php
// DO NOT DO THIS
protected $_config = array(
    'foo' => 'bar',
    'baz' => 'dib',
);

Instead, define config defaults in a protected property named for the class, withan underscore prefix.

For exmple, a "Vendor_Class_Name" class would define the default config array in "$_Vendor_Class_Name". This convention lets child classes inherit parent config keys and values.

<?php
// DO THIS INSTEAD
protected $_Vendor_Class_Name = array(
    'foo' => 'bar',
    'baz' => 'dib',
);

$_life

(int) The lifetime of each cache entry in seconds.

Inherited from Solar_Cache_Adapter.

$_pool_node

(array) Default configuration for a pool server node.

host

(string) The memcached host name, default 'localhost'.

port

(int) The memcached port number, default 11211.

persistent

(bool) Controls the use of a persistent connection, default TRUE.

weight

(int) Number of buckets to create for this server, which in turn controls its probability of being selected. The probability is relative to the total weight of all servers. Default 1.

timeout

(int) Value in seconds which will be used for connecting to the daemon. Default 1.

retry_interval

(int) Controls how often a failed server will be retried. Default is 15 seconds. A setting of -1 disables automatic retry.

status

(bool) Controls if the server should be flagged as online. Setting this parameter to FALSE and retry_interval to -1 allows a failed server to be kept in the pool so as not to affect the key distribution algorithm. Requests for this server will then failover or fail immediately depending on the memcache.allow_failover php.ini setting. Defaults to TRUE, meaning the server should be considered online.

failure_callback

(callback) Allows specification of a callback function to run upon encountering a connection error. The callback is run before failover is attempted, and takes two parameters: the hostname and port of the failed server. Default is null.

Private

None.



Local