Symfony Cache Component with SncRedisBundle

Since version 3.1 there is a Cache component with a PSR-6 implementation integrated in Symfony.
So we do not need to add a 3rd party lib as Doctrine Cache anymore when we need caching these days.

Doctrine Cache does the job but by implementing a standard the Symfony Cache seems to have another advantage besides its delievered anyway. So i checked it out.

Documentation is still a bit sparse and the best resource so far is this blogpost:
https://symfony.com/blog/new-in-symfony-3-1-cache-component

I wont go into detail on how you use the Cache but rather how you integrate it with Redis, which is my favourite Cache backend.
Continue reading “Symfony Cache Component with SncRedisBundle”

tell redis db to not persist

redis persists its memory data in snapshot style in every n seconds depending on your configuration.
read more here.
perhaps you would like to use redis as a pure in-memory db, like f.e. memchache.
you can tell redis to not persist and save some bits&miliseconds.
this could be the case when using redis as a f.e. realtime queue, you wont need persistence,
because you could say: nobody needs is newsfeed from the that day before the machine crashed ;)

alright, do so by:
Continue reading “tell redis db to not persist”