[Tickets #10072] Re: Memcache storage is duplicating the key prefix

bugs at horde.org bugs at horde.org
Fri May 13 22:30:39 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10072
------------------------------------------------------------------------------
  Ticket             | 10072
  Updated By         | Michael Slusarz <slusarz at horde.org>
  Summary            | Memcache storage is duplicating the key prefix
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2011-05-13 22:30) wrote:

>> The default value for memcache caching prefix
>> ($conf['cache']['params']['prefix']) is empty, so a duplicate prefix
>> would be an issue with your local installation.
>
> I have setted $conf['cache']['params']['prefix'] because i have  
> multiple horde instances (vhosts) in the same memcache...
> If the value of $conf['cache']['params']['prefix'] is something like  
> 'ABC' then i will have on my memcache duplicate keys like:
> ABC_horde_perms_sql
> ABC_ABC_horde_perms_sql
> and for some others i even have triplicates!!!
> ABC_ABC_ABC_horde_perms_sql
>
> Picking up a practical example:
> Horde_Cache_Storage_Memcache method set(), adds the prefix to the  
> key and then calls $this->_memcache->set().. and this method will  
> also append the prefix to the $key, thus making it duplicate

I still don't understand why this is an issue.  Please don't tell me  
you are looking at key names in your memcache (or any) backend.   
Because that is completely irrelevant.

All that matters is that for a given key input to Cache::get() (or  
Cache::set()), a single, unique data value is associated with it.  If  
a key has 2, 3 (or 10) prefixes tacked on to the front, why does that  
matter?






More information about the bugs mailing list