I want to use memcache into my application. I have enabled php_memcache.dll in php.ini file and normal memcache is working fine in simple PHP.
$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;
But I don't know how to create object for Memcache in Zend Framework 2 for normal Memcache, when I am trying to shows error as:
Fatal error: Class 'Application\Controller\Memcache' not found
Please help me to solve my problem.