• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memcached not saving

#1
I get cached miss everytime.

I have rebooted my localhost. Memcached seems to be configured right. Am I missing something? Bug?

PHP Code:
if ($this->cache->memcached->is_supported())
 
       {
$data $this->cache->memcached->get('foo');
if (!
$data){
 echo 
'cache miss!<br />';
 
$data 'bar';
 
$this->cache->memcached->save('foo',$data60);
}
echo 
$data;
echo 
'<pre>';
var_dump($this->cache->memcached->cache_info());
echo 
'</pre>';

Reply

#2
Just double checking if you specified server configuration for your memcached server in CI config file.
Reply

#3
bribar,

I setup a fresh install of CI on a fresh server via Vagrant with Memcached installed. I copy/pasted your code, and it works as-is.

The Memcached defaults are
Hostname: 127.0.0.1
Port: 11211

If your Memcached server is configured differently, be sure to update the configuration in application/config/memcached.php (or your specific environment's memcached.php config file)
Reply

#4
Save in memcache doesn't work for me also.

Server works! Checked with http://phpmemcache.googlecode.com/svn-hi....class.php
Reply

#5
If you are on 3.0.4 then this is a known issue being fixed in 3.0.5

See: https://github.com/bcit-ci/CodeIgniter/issues/3919
Reply

#6
(02-18-2016, 03:13 PM)jtneal Wrote: If you are on 3.0.4 then this is a known issue being fixed in 3.0.5

See: https://github.com/bcit-ci/CodeIgniter/issues/3919

That's a sessions issue that was fixed, nothing to do with the Cache library.
Reply

#7
(02-18-2016, 03:13 PM)jtneal Wrote: If you are on 3.0.4 then this is a known issue being fixed in 3.0.5

See: https://github.com/bcit-ci/CodeIgniter/issues/3919

Still not working after Update. Session Memcache != Cache Memcache
Reply

#8
Someone know the solution for this issue?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.