CodeIgniter Forums
CodeIgniter Memcached Caching - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CodeIgniter Memcached Caching (/showthread.php?tid=54501)



CodeIgniter Memcached Caching - El Forum - 09-11-2012

[eluser]sweetD[/eluser]
So I read the below in the user guide but there is no memcached.php in the applicaiton/config/ directory. A bit confused as how to go about and use this feature.

Quote:Memcached Caching

Multiple Memcached servers can be specified in the memcached.php configuration file, located in the application/config/ directory.

All of the functions listed above can be accessed without passing a specific adapter to the driver loader as follows:

$this->load->driver('cache');
$this->cache->memcached->save('foo', 'bar', 10);
For more information on Memcached, please see http://php.net/memcached

http://ellislab.com/codeigniter/user-guide/libraries/caching.html#memcached


CodeIgniter Memcached Caching - El Forum - 09-11-2012

[eluser]PhilTem[/eluser]
Hm, true story.

Maybe you want to open an issue on GitHub and pointing the people from EllisLab towards what you found Wink


CodeIgniter Memcached Caching - El Forum - 09-11-2012

[eluser]sweetD[/eluser]
Now this seems irrelevant if you are using a service such as MemCachier, that uses user name and password and has no value of weight. I'm also new to this so I'm probably not doing this right. Any help would be greatly appreciated.


CodeIgniter Memcached Caching - El Forum - 09-11-2012

[eluser]sweetD[/eluser]
[quote author="PhilTem" date="1347399295"]Hm, true story.

Maybe you want to open an issue on GitHub and pointing the people from EllisLab towards what you found Wink[/quote]

Thanks, I did just that https://github.com/EllisLab/CodeIgniter/issues/1784


CodeIgniter Memcached Caching - El Forum - 09-11-2012

[eluser]sweetD[/eluser]
So I'm using the memcache server of MemCachier. I got a library going but I'm getting;

Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined offset: -1001

Filename: libraries/MemcacheSASL.php

Line Number: 137

Not sure if I should just ignore error with an @ symbol infront of the method call. I say this because it is adding correctly to the memcache server, but I get that error posted above.

I tried the MemcacheSASL.php class outside of codeigniter and I get no issues at all using the methods.


CodeIgniter Memcached Caching - El Forum - 09-11-2012

[eluser]sweetD[/eluser]
It seems the error is coming from here;

Code:
if ($this->_options[self::OPT_COMPRESSION]) {
   $flag = 16;
   $value = gzcompress($value);
  }

which is defined earlier;

Code:
const OPT_COMPRESSION = -1001;

I tried to echo $this->_options[self::OPT_COMPRESSION] and it reproduced the error above, again this is when it's inside of codeigniter, not when it's being used as standalone.


CodeIgniter Memcached Caching - El Forum - 09-14-2012

[eluser]sweetD[/eluser]
Here is the response from the issue I posted on gitHub

https://github.com/EllisLab/CodeIgniter/issues/1784