first commit
This commit is contained in:
22
wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/ReflectionCacheArray.php
vendored
Normal file
22
wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/ReflectionCacheArray.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace WPML\Auryn;
|
||||
|
||||
class ReflectionCacheArray implements ReflectionCache
|
||||
{
|
||||
private $cache = array();
|
||||
|
||||
public function fetch($key)
|
||||
{
|
||||
// The additional isset() check here improves performance but we also
|
||||
// need array_key_exists() because some cached values === NULL.
|
||||
return (isset($this->cache[$key]) || array_key_exists($key, $this->cache))
|
||||
? $this->cache[$key]
|
||||
: false;
|
||||
}
|
||||
|
||||
public function store($key, $data)
|
||||
{
|
||||
$this->cache[$key] = $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user