We have an application in symfony2 and would like to add result caching of query results in Redis through Doctrine.
In our research we found Snc\RedisBundle and Predis combination, but have no experience with these bundles.
We are looking for a developer to prepare this for us to implement in our existing symfony application.
Sample of the code how we would like to implement:
class BlogRepository extends EntityRepository
public function findMostRecentBlog()
# init predis client
$predis = new RedisCache();
# define cache lifetime period as 1 hour in seconds
$cache_lifetime = 3600;
->createQuery('SELECT b FROM repository b')
# pass predis object as driver
# set cache lifetime
The Redis host needs to be able to set through parameters/config , as it will change depending on our environment.
The kind of settings we want in our [url removed, login to view] are:
auto_generate_proxy_classes: "%[url removed, login to view]%"
# Redis configuration
# configure predis as client
# configure doctrine caching
If you have any suggestions for different methods for example, please don't hesitate to let us know and suggest.
Before we award the project, we need a sample to see that you have experience in this area.
Requested by some freelancers > code of demo test symfony project that we are testing this new feature with.
You can check the EnalityBundle > EntityRepository, this is where the code snippet from briefing is taken from.
Upload was too large, please download from Google Drive http://bit.ly/1zstTIo