TOP

Mobi_Mtld_DA_CacheProvider_CacheProviderInterface

A cache provider such as APC or Memcache 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. A valid cache provider must implement this interface to be usable by the APIs.
Package
Mobi\Mtld\DA\Device\CacheProvider
Author
DeviceAtlas Limited

Methods

clear

void $obj->clear()

Clear the whole cache.

Returns

void

delete

void $obj->delete(string key)

Remove an item from the cache.

Arguments

    key (string)
    cache key

Returns

void

get

mixed $obj->get(string key)

Get a stored value form cache.

Arguments

    key (string)
    cache key

Returns

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

set

void $obj->set(string key)

Store a value in cache.

Value
mixed value value to be set to the cache key

Arguments

    key (string)
    cache key

Returns

void