Derek Haynes
2006-Nov-04 02:47 UTC
[Rails] #expire_fragment in models...any clean solutions?
I''ve seen a couple of workarounds on the mailing list related to expiring cached fragments inside of models, but nothing too clean. Anybody have any suggestions for handling this at the model-level? I have an application is updated outside of the Rails controllers, so I can''t use a Sweeper. The 2 methods I''ve seen: a. Use a callback to generate an HTTP post on a controller action that expires a fragment. While a little convoluted, it actually doesn''t look terribly bad, but the coupling between the controller and the model isn''t desired. b. A home-baked solution to delete the fragments...however, there''s a lack of solid code snippets for this method. Any other ideas? Cheers, Derek -- Derek Haynes Highgroove Studios - http://www.highgroove.com San Mateo, CA | Atlanta, GA Keeping it Simple. 650.276.0908 Slingshot - Ruby on Rails Business Hosting http://www.slingshothosting.com
Maybe Matching Threads
- index#term_docs returns no docs / term_docs_for does
- New automated Capistrano setup for Apache2.1+ and mongrel_cluster
- Mongrel Upload Progress progress method returns Content-Length: 0
- BackgrounDRb / Testing Error: uninitialized constant BackgrounDRb
- Updated Apache Best Practices Doc fixes