Open odoucet opened 8 years ago
When you try to add the cache yourself, you should instantiate a "Lsw\MemcacheBundle\Doctrine\Cache\MemcacheCache" class and then call "setMemcache()" on the created object to set the client.
OK, updating the doc will be great about it :)
Well, we still have not figured out why "executeCacheQuery" gives an error and why it seems it does not work for multiple entity managers. Or did you find reasons for that?
Not yet, And I have to admit I've changed my code after I encountered this bug to cache the query result myself.
2015-10-01 22:58 GMT+02:00 Maurits van der Schee notifications@github.com:
Well, we still have not figured out why "executeCacheQuery" gives an error and why it seems it does not work for multiple entity managers. Or did you find reasons for that?
— Reply to this email directly or view it on GitHub https://github.com/LeaseWeb/LswMemcacheBundle/issues/59#issuecomment-144846530 .
OK, thank you. I will try to reproduce it and update this thread.
Documentation already gives information about how to add LswMemcacheBundle support on Doctrine (see https://github.com/LeaseWeb/LswMemcacheBundle#doctrine-support) But even if this is well handled for default entity manager, it seems it does not work for multiple entity managers :
When using executeCacheQuery() we get : Trying to cache a query but no result driver is configured.
Another way to check :
Copy of YAML :
If we try to add the cache class ourself, we end with an error :
This gives this error : Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Lsw\MemcacheBundle\Cache\AntiDogPileMemcache given.