Memcached implementation (MGNLCACHE-99)

[MGNLCACHE-101] Workaround for limited key length Created: 15/May/15  Updated: 02/Jun/15  Resolved: 18/May/15

Status: Closed
Project: Cache Modules
Component/s: memcached
Affects Version/s: None
Fix Version/s: 5.4

Type: Sub-task Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:

 Description   

Memcached server has limitation for key length (250 characters). We currently do MD5 hash as a workaround. This could be an issue:

  1. performance (MD5)
  2. multiple keys with same hash

Possible solution:

  1. create hash only for long keys
  2. Would could retrieve item from cache based on hash. Then check real cache key which would be store as part of cached value.
  • A] save an uncacheable item for all other keys with the same hash (acceptable only if such long keys would be an exception + log warning)
  • B] save set of all items with the same hash into cache (save with the lowest TTL from all of them, could be a problem with size limitations - default 1MB)

Generated at Sun Feb 11 23:52:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.