Bug #28482
closedt3lib_cache_backend_MemcachedBackend
0%
Description
Current interface t3lib_cache_backend_Backend exposes an has($entryIdentifier) function which return boolean-true if an item with given key is present in cache. This helper function is largely used among extensions and code that uses caching framework.
To implement this has() function, t3lib_cache_backend_MemcachedBackend currently does a "get() !=== FALSE" to return the result.
Upon a positive has(), 99% of the time, a get() with the exact same key will be issued.
This lead to two successive get call to memcache backend with the exact same key.
In my custom rewrite of the memcache backend, I keep the has() result in memory, and check back for it in every get() call.
Please see attached tx_libeomemcache_handler_LibeoMemcachedBackendBase class.
Files