Daniel Greig
2007-Feb-21 22:10 UTC
[Backgroundrb-devel] accessing controller methods from backgreoundrb
Hi all, I am trying to use backgroundrb to cache a set of controller actions that are quite processor expensive (there is some pretty heavy xml processing going on). In my rails app I have page caching set up to observe the appropriate controllers and models and all works well. However when model changes occur in a backgroundrb process the cache sweeper isn''t notified of the changes (and consequently the cache isn''t updated). I assume this is because backgroundrb doesn''t have access to the controller and view layers? Is it possible to trigger the normal rails cache sweepers from backgroundrb somehow, or, is it possible to gain access to controller methods so that I can use render_to_string and save the output of that action to a file and create the cached files manually? Either option should get me back on track. A final note - the rails application I''m working on needs to be hosted on a windows machine, so I''m stuck using the earlier version of backgroundrb for the time being. thanks, Dan