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

Dmitry Dulepov dmitry at typo3.org
Fri Dec 5 17:25:02 CET 2008


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?

-- 
Dmitry Dulepov
TYPO3 core team
In the blog: http://typo3bloke.net/post-details/zend_debugger_goes_64_bit_on_mac_os_x/
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9884_v2.diff
Type: text/x-diff
Size: 7710 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081205/c099cca1/attachment.diff 


More information about the TYPO3-team-core mailing list