\DeviceAtlas\Device\CacheProviderFileCache

File 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
No constants found
No protected methods found
No protected properties found
N/A
rmdir()
cachePath()
$cacheDir
$cacheItemExpiry
N/A

Properties

$cacheDir

$cacheDir : 

Type

$cacheItemExpiry

$cacheItemExpiry : 

Type

Methods

__construct()

__construct(  $cacheItemExpiry = 86400,   $cacheDir = null) 

Construct a CacheProvider object.

Parameters

$cacheItemExpiry
$cacheDir
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

rmdir()

rmdir(  $dir,   $empty = false) 

Parameters

$dir
$empty
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

cachePath()

cachePath(  $key,   $createDirectory = false) 

Parameters

$key
$createDirectory
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