ninajansen.dk

ninajansen.dk header image 1

Entries Tagged as 'sweepers'

Fragment cache expiry from background jobs is a hot mess

juni 11th, 2008 · Comments

In order to get a cache sweeper to actually do anything when it is triggered, it must be called from a controller, and that controller must be instantiated though a http request.
This is what I have learned from trying to expire fragment cache from background scripts in Ruby om Rails. It simply is not possible. [...]

[Read more →]

Tags: Ruby on Rails · cache · rant · sweepers

Cache sweepers in Rails, put them in app/models!

maj 14th, 2008 · Comments

So i’ve been spending hours tracking this one down: I wanted to have cache sweepers in rails and followed the advice from railscasts and railsevny. Those tutorials tell you to put sweepers in an app/sweepers directory and add that directory to your load path. DON’T DO THAT. That simply did not work for me (using [...]

[Read more →]

Tags: Ruby on Rails · cache · sweepers · tips