I'm trying to learn more about caching strategies and I'm trying to
wrap my head around conditional GET in Rails. I think I get the basic
idea but I can't get it to work properly, or maybe I'm understanding
it wrong. Either way, some help would be appreciated.

I have made a simple test app with the following action:

def show
  @thing = Thing.find(params[:id])
  fresh_when(:etag => @thing, :last_modified => @thing.updated_at.utc)
end

The url of this representation is: http://high-night-436.heroku.com/thingies/1

As I understand it this url should return a 304 not modified header
after the first visit, but it doesn't. My first thought was that maybe
I'm understanding this wrong and Varnish receives this header and
servers the cached page, but I don't think this is happening either.
To test this I included some code in the view that shows a random item
from an array, if the page was server from the cache this item should
always be the same.

I think I'm misunderstanding some basic concepts here, but I can't
figure out what those are exactly.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to