0
我想在我的应用程序中使用memcache。我在php.ini文件中启用了php_memcache.dll,正常memcache在简单的PHP中工作正常。如何在命名空间应用程序中使用memcache?
$memcache = new Memcache;
$memcache->connect('localhost', 11211);
$test = $memcache->get("A");
if(empty($test)){
echo "setting cache";
$memcache->set("A","Cache contents",MEMCACHE_COMPRESSED,50);
}
echo $test;
但我不知道如何在Zend框架2正常的Memcache,创建对象的内存缓存,当我试图显示错误为:
Fatal error: Class 'Application\Controller\Memcache' not found
请帮我解决我的问题。