On Jan 07 2012 08:50 am, till wrote:
> On Sat, Jan 7, 2012 at 2:11 PM, Thomas Bruederli <[email protected] [1]> wrote: > >> Rob Sheldon wrote: >> > Hi, >> > >> > Finally decided to get memcached up and running with Roundcube -- >> > awesome work there. >> > >> > I ran into a problem getting it to go at first though. Turned on all >> > the logging in memcache and found this relevant bit: >> > > [...] >> >>> >> > In rcube_session.php, I mucked about with the first line of >> > mc_destroy(), changing it to: >> > >> > $ret = $this->memcache->delete($key, 0); >> > >> > ...which makes everything happy, despite being incorrect. >> >> I don't have a problem adding this to your code and becoming "incorrect" >> unless anybody else reports problems with that change. PHP usually doesn't >> complain about additional arguments passed to a function call, only if >> there are too few arguments passed. > > +1 for the change: http://docs.php.net/manual/en/memcache.delete.php [2] > This states that it's not recommend to use the timeout paramter, but using 0 is safe and shouldn't break anything anywhere else. > Till ...assuming that the PHP dev team doesn't change their mind later, which, y'know, never happens... I also had to make a similar change in /program/include/rcube_cache.php: private function delete_record($key, $index=true) { if ($this->type == 'memcache') $this->db->delete($this->ckey($key), 0); ...otherwise, the first time you sign out, you can't sign back in again. Looks like Roundcube tries to delete a previous cache id during login. Those are the only two changes I've needed to make and everything has worked great so far. I try not to alter Roundcube's code at all (makes future upgrades a little less easy) but memcache was just too tempting. Thanks, - R. -- [__ Robert Sheldon [__ Founder, No Problem [__ Information technology support and services [__ (530) 575-0278 [__ "You must be the change you wish to see in the world." -- Mahatma Gandhi Links: ------ [1] mailto:[email protected] [2] http://docs.php.net/manual/en/memcache.delete.php
_______________________________________________ List info: http://lists.roundcube.net/dev/ BT/8f4f07cd
