\DeviceAtlas\Device\CacheProviderMemCache

Memcache cache provider may be used by the DeviceApi and DeviceApiWeb to cache the detected properties. Using cache improves the performance by not doing unnecessary lookups in the data files.

Summary

Methods
Properties
Constants
__construct()
get()
put()
delete()
clear()
No public properties found
IS_MEMCACHE
IS_MEMCACHED
No protected methods found
No protected properties found
N/A
No private methods found
$memcache
$extensionType
$cacheItemExpiry
N/A

Constants

IS_MEMCACHE

IS_MEMCACHE = 1

IS_MEMCACHED

IS_MEMCACHED = 2

Properties

$memcache

$memcache : 

Type

$extensionType

$extensionType : 

Type

$cacheItemExpiry

$cacheItemExpiry : 

Type

Methods

__construct()

__construct(  $cacheItemExpiry = 86400,   $host = 'localhost',   $port = 11211,   $pconnect = false) 

Construct a CacheProvider object.

Parameters

$cacheItemExpiry
$host
$port
$pconnect
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

get()

get(  $key) : mixed

Get a stored value form cache.

Parameters

$key
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

mixed —

the cached value or null if the key does not exist in cache

put()

put(  $key,   $value) : boolean

Store a value in cache.

Parameters

$key
$value
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

boolean —

true=cache stored

delete()

delete(  $key) : boolean

Remove an item from the cache.

Parameters

$key
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

boolean —

true=cache deleted

clear()

clear() : boolean

Clear the whole cache.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

boolean —

true=cache cleared