\WurflCloud_Cache_CacheInterface
Interface that all Cache providers must implement to be compatible with WurflCloud_Client
Synopsis
interface WurflCloud_Cache_CacheInterface
{
- // methods
- public array|boolean getDevice()
- public array|boolean getDeviceFromID()
- public boolean setDevice()
- public boolean setDeviceFromID()
- public int getMtime()
- public void setMtime()
- public void purge()
- public void incrementHit()
- public void incrementMiss()
- public void incrementError()
- public array getCounters()
- public void resetCounters()
- public int getReportAge()
- public void resetReportAge()
- public array stats()
- public void close()
Methods
public
- close() — Closes the connection to the cache provider
- getCounters() — Returns an array of all the counters
- getDevice() — Get the device capabilities for the given user agent from the cache provider
- getDeviceFromID() — Get the device capabilities for the given device ID from the cache provider
- getMtime() — Gets the last loaded WURFL timestamp from the cache provider - this is used to detect when a new WURFL has been loaded on the server
- getReportAge() — Returns the number of seconds since the counters report was last sent
- incrementError() — Increments the count of errors
- incrementHit() — Increments the count of cache hits
- incrementMiss() — Increments the count of cache misses
- purge() — Deletes all the cached devices and the mtime from the cache provider
- resetCounters() — Resets the counters to zero
- resetReportAge() — Resets the report age to zero
- setDevice() — Stores the given user agent with the given device capabilities in the cache provider for the given time period
- setDeviceFromID() — Stores the given user agent with the given device capabilities in the cache provider for the given time period
- setMtime() — Sets the last loaded WURFL timestamp in the cache provider
- stats() — Gets statistics from the cache provider like memory usage and number of cached devices