_cyqui
If yes, that's an interesting approach, but in my opinion it has two drawbacks. - It requires a loop through each entities that is supposed to have it's hits counted periodically and query Varnish for it. - There can be hits not counted if for some reason we purge Varnish (not sure about this assertion tho) between two polls. http://cyqui.fr/blog/Varnish-counting-hits-on-cached-objects...
While with Redis as the counter storage:
- We can fetch periodically keys matching 'view_counter_${entity_type}_${entity_id}' (using KEYS command) and it gives a lot of flexibility application side - We do not have to worry about the counters states
It's been a long time since i wanted to start a blog, and i just did it.
That's my second blog article and aslo the first long one.
I Hope you will like it, please comment and let me know whether you liked (or not)
Thanks !