23 Jul 2016 - by 'Maurits van der Schee'
I have released version 3 of the Symfony Memcache Bundle which is now renamed from "LswMemcacheBundle" to "TqdMemcacheBundle". I started the bundle to provide mature cache management to Symfony2. It now supports Anti-Dog-Pile, session locking, Doctrine query caching and other important features, such as server pooling support and Windows compatibility.
It can be important in a PHP based web application to apply aggressive application level caching. PHP is not a fast language and many web applications use the majority of the time to request, retrieve and transform data they receive from the database. The results of this process are very suitable to be cached in Memcache with a timeout that is specific to the data and it's use.
This memcache bundle for symfony is great, but when combining it with Nginx you can take it one step further. If you are running on Nginx (or openresty), then your web server may make decisions based on Memcache data using the openresty lua memcache module or the nginx memcache module. This may prevent requests from hitting your PHP layer altogether, therefor allowing you achieve unparalleled performance.
The bundle does not provide an abstraction of the caching provided by Memcache. It allows you to use all it's features. The software exposes the Memcache object "as-is" only adding some features (such as "web debug toolbar" and "anti dog pile" support). Version 1 was based on the "php-memcached" extension, while version 2 was based on the Windows compatible "php-memcache" extension (without a "d").
Other articles I have written about this bundle are:
PS: Liked this article? Please share it on Facebook, Twitter or LinkedIn.