[TYPO3-core] FYI72: enhancements to memcached caching backend

Steffen Kamper info at sk-typo3.de
Fri Dec 5 19:10:26 CET 2008


Hi Dmitry,

Dmitry Dulepov schrieb:
> Hi!
> 
> Dmitry Dulepov wrote:
>> BT reference: http://bugs.typo3.org/view.php?id=9884
>>
>> Problems:
>> 1. memcached backend does not support connections through Unix sockets ("unix:///var/run/memcached.sock")
>> 2. if memcached server is unavailable, this fact will be detected too late (when using get/set) and nasty error message will be shown
>>
>> Solution:
>> 1. enable support for Unix sockets (this is official way to do it, not a hack!)
>> 2. use "connect" instead of "addServer"
> 
> Here is version 2 of the patch, whch takes into account Karsten's points. I also made sure that no warnings are shown in the Backend if connection fails. In the worst possible case (when connection fails) Memcached cache becomes null cache and writes information into the syslog using t3lib_div::sysLog(). By default sysLog is disabled in TYPO3 but it can be set to mail or php logger or system log in the Install tool.
> 
> I am not fully sure that null logging is good. If admin is unaware about died memcached, TYPO3 will run without any cache and it will be slow. But I could not imagine anything better. Just stopping any FE output is even worse than running without cache. Falling back to another cache is difficult due to the architecture. So I think I made the best possible solution for now.
> 
> Any objections?
> 
> 

+1 by reading, looks good.
2 little nitpickings:
1. chunk, comment Indicates·whther· [e is missing]
2.chunk, $host·=·$serverConf;·$port·=·0; should go in 2 lines

vg Steffen


More information about the TYPO3-team-core mailing list