for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ds\Cache;
/**
* Class MemcacheStorage
* @package Ds\Cache
*/
class ApcStorage implements CacheStorageInterface
{
private $enabled = false;
public function __construct()
$this->enabled = extension_loaded('apc');
}
* @param string $key
* @return bool
public function has($key){
return \apc_exists($key);
* @param mixed $value
* @param int $expires
* @return void
public function set($key, $value, $expires)
\apc_store($key, $value, $expires);
* @return mixed
public function get($key)
return \apc_fetch($key);
public function delete($key)
if (\apc_exists($key)){
\apc_delete($key);