Leaseweb / LswMemcacheBundle

Symfony bundle for Memcache Doctrine caching and session storage in the Web Debug Toolbar.
MIT License
202 stars 57 forks source link

mcrouter compatibility #78

Open theosilva opened 8 years ago

theosilva commented 8 years ago

Hi,

Working with this bundle on its release 2.1, I had issue with mcrouter or any working cluster of memcache servers. I fixed this problem by a simple hack in Lsw\MemcacheBundle\Cache\LoggingMemcache at line 145 in get method :

$result = parent::get($_key);

This method has these two pointer parameters "&$flags=null" and "&$cas=null" which are may be usefull in set method but completely not used to get values. These two parameters won't allow to get value with any cluster or memache proxy.

Thanks for this project.

mevdschee commented 8 years ago

I disagree with them being "completely not used".

For more information about what CAS is and what the flags mean, read:

https://github.com/memcached/memcached/blob/master/doc/protocol.txt