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

bugs at horde.org bugs at horde.org
Mon May 16 21:39:12 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-16 21:39) wrote:

>> 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.
>
> Yes, i was debugging memcache get() and set() methods.
>
>> 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?
>
> I think it matters, because without the patch after a single login i  
> have (ex) 30 keys being created on cache. With the patch i only have  
> like 12 or 13.. this is because without the patch every key is  
> created twice in the database (one with one prefix the other with  
> the prefix 2 times) and some are even created 3 times...
>
> I don't say that memcache is not working correctly, im just saying  
> that i think there's some problem with it. The way i see it having  
> in the memcache something like:
> PREFIX_number_of_session
> PREFIX_PREFIX_number_of_session

If this is happening then this *might* be an error.  You will have to  
track down where these alleged duplicate prefixes are being generated  
(Horde::debug() might be useful for this).

Note that just because the data value is the same, that does NOT mean  
that the key is being duplicated.  That is a dangerous assumption and  
is simply wrong.

FWIW, your patch doesn't fix this problem at all.  All you are doing  
is removing the prefix feature, which is not the correct solution.






More information about the bugs mailing list