Nash.rb Message Board › Page Caching presentation

Page Caching presentation

A former member
Post #: 4
Below is a link to Slideshare for a copy of the presentation "Rails Page Caching" given at the February meetup.

http://www.slideshare.net/travisroberts/rails-caching-3221485­
Daniel N.
user 8479725
Nashville, TN
Post #: 15
Thanks for the great presentation, Travis.

Travis' talk inspired a few questions with respect to a project I'm working on. Here are the findings from some testing I did after this evening's meeting.

As mentioned, I'm storing flashcard images in the database, and want to be able to cache them. It turns out that if the URL ends with a file extension, then the cached images are also saved with that extension. That is,
http://example.com/ca...­
results in a cache file of /public/card_img/1.html, even when including a 'image/png' type in the send_data call, but
http://example.com/ca...­
results in a cache file of /public/card_img/1.png

This means that there should be no problem using images stored in the database...they just become images the first time they are used and are recognizable by Apache, et al, as images.

On another note, expire_page can be called from within the controller. As Travis mentioned, this won't suffice for data that is coupled, but since the controller handles caching, it seems symmetrical for it to take care of expiring the cache if the data being cached are simple (as in my case, an image that can only be updated from the controller).

Cheers,

Daniel
Powered by mvnForum

Our Sponsors

  • Centresource

    Centresource sponsors our food and beverages at the meetup!

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy