CodeIgniter Forums
Memcached not saving - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: Memcached not saving (/showthread.php?tid=64360)



Memcached not saving - bribar - 02-12-2016

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>';




RE: Memcached not saving - siburny - 02-13-2016

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


RE: Memcached not saving - jtneal - 02-14-2016

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)


RE: Memcached not saving - mimo - 02-18-2016

Save in memcache doesn't work for me also.

Server works! Checked with http://phpmemcache.googlecode.com/svn-history/r2/trunk/memcache.class.php


RE: Memcached not saving - jtneal - 02-18-2016

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


RE: Memcached not saving - Narf - 02-19-2016

(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.


RE: Memcached not saving - mimo - 02-19-2016

(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


RE: Memcached not saving - mimo - 02-24-2016

Someone know the solution for this issue?