cursedcoder/dark-redis-list-bundle

Symfony2 bundle which allows you to store part of doctrine entities data in Redis. For more information please read text below.
then we can pass it to the paginator, but no need to talk about it now.
Redis List — it's structured data, that is stored in Redis hashes (do not confuse native Redis lists with ours). Okay, let's learn more about this.
Each list have name, for example — 'View', each element of this hash has unique ID and it contains some value.
Here is example of Redis List:
Hash ID Value
View — 1 — SonataBadBundle:Post;1
View — 2 — SonataBadBundle:Post;2
View — 3 — SonataBadBundle:Post;3
View — 4 — KnpGoodBundle:Article;1
View — 5 — MyPromoBundle:Promo;1
So, as you can see that each hash:
Okay, but how it's can satisfy my requirements?
Each element of Redis List contains information about entities — repository name, id.
I can fetch those entities through repository, and then cache it in Memcached for example.
Add DarkRedisListBundle in your composer.json
{
"require": {
"cursedcoder/dark-redis-list-bundle": "*"
}
}
Register the bundle in your app/AppKernel.php:
<?php
public function registerBundles()
{
$bundles = array(
// ...
new Dark\RedisListBundle\DarkRedisListBundle(),
);
)
Redis listener is automatically loads Redis-data to your entities. It is enabled by default.
# app/config.yml
dark_redis_list:
collector: single # or pieces
template: DarkRedisListBundle:Pagination:list.html.twig
time: 604800 # cache lifetime, 0 by default
use_listener: true
I wrote this bundle for my own needs, so don't angry if anything will going not good :P
How can I help you explore Laravel packages today?