1 Replies - 233 Views - Last Post: 01 February 2012 - 06:40 AM Rate Topic: -----

Topic Sponsor:

#1 juggy7  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 47
  • Joined: 31-May 11

Memcache in ZEND

Posted 30 January 2012 - 04:35 AM

Hi Friend's,
I want to implement the caching on my site.I am trying to implement the memcache but its not working.Following is the code i am trying to implement.If i use File,apc its woking fine but when i m using memcache is not working.so friend's please help to figure out my mistake.
$frontendOpts = array(
		'caching' => true,
		'lifetime' => 1800,
		'automatic_serialization' => true
	);
 
	$backendOpts = array(
		'servers' =>array(
			array(
			'host' => 'localhost',
			'port' => 11211
			)
		),
		'compression' => false
	);
	$cache2 = Zend_Cache::factory('Core', 'Memcache', $frontendOpts, $backendOpts);
        //$cache2 = Zend_Cache::factory('Core', 'File', $frontendOpts, $backendOpts);
	Zend_Registry::set('Memcache', $cache2);


when i use following command in linux ps -A | grep memcached
13451 pts/2 00:00:00 memcached //following is the result

So i suppose that memcached is install on my server.

Is This A Good Question/Topic? 0
  • +

Replies To: Memcache in ZEND

#2 juggy7  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 47
  • Joined: 31-May 11

Re: Memcache in ZEND

Posted 01 February 2012 - 06:40 AM

Friend,
issued solved.Mistake in php.ini file.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1