Project

General

Profile

Actions

Bug #28482

closed

t3lib_cache_backend_MemcachedBackend

Added by Raphaël Riel over 13 years ago. Updated over 11 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2011-07-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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

libeo_memcache_custom.tar.gz (5.48 KB) libeo_memcache_custom.tar.gz Raphaël Riel, 2011-07-26 20:32
Actions

Also available in: Atom PDF