On Sat, Jan 7, 2012 at 6:54 PM, Rob Sheldon rob@associatedtechs.com wrote:
**
On Jan 07 2012 08:50 am, till wrote:
On Sat, Jan 7, 2012 at 2:11 PM, Thomas Bruederli roundcube@gmail.comwrote:
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
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...
Memcache is not a core extension but since a lot of contributors to it are familiar with (or neck-deep in) the PHP process, follows BC principles throughout. If you have any issues, I can put you in touch with people who work on it. I happen to know a few of them. Just let me know. ;)
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.
+1 for that change as well.
Till
List info: http://lists.roundcube.net/dev/ BT/aba52c80