I am building a Rails website which has content that expires at some time in the future.

Since this content is cached, by the time it expires I would like a method to sweep the cache at that time. Since it's based on a date, I cannot use the Rails app itself. I could use polling or sweep the cache every 5 minutes, but maybe there's a better approach?

I would like to know if I can use backgroundrb's at/cron-like features to schedule one-off execution of a piece of code at a date/time in the future. This would be a sweeper that runs at the expires_at time of my content.


I realise I can build a worker that goes into a sleep/wait loop until the desired time, but that's not really better than polling.


Could backgroundrb be helpful?
_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel

Reply via email to