Automattic / Automattic/wp-memcached
Limit cache key length
- Dominant language
- PHP
- Stars
- 172
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Memcache has a key length limit of 250 characters. Problems can arise if a cache key greater than this is used. It seems memcache truncates the key so it is very possible to have collisions and unexpected behavior. Other object caches can handle very large keys so this object cache should check if a key is too long and hash it with md5 or similar to prevent problems.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the WordPress object cache builds and passes keys to Memcached, then identify where the 250-character limit can be enforced. Verify that oversized keys no longer risk collisions while other object caches continue to work, and run the relevant cache tests if the repository provides them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- memcached, php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100