Thanks for your help Chris and Carl.

You both were right because I didn't fully understand how heroku's
http caching was working (I thought it was only used by Varnish not
the browser).

I highly recommend the podcast RailsLab : Scaling Rails for anybody
messing around with this stuff:
http://itunes.apple.com/us/podcast/railslab-scaling-rails/id303252563
(itunes link)

On Apr 13, 5:00 pm, Chris Hanks <[email protected]> wrote:
> Chap's question is pretty clear - he wants to flush a specific page
> from the http cache. Unfortunately, there's no way to do this on
> heroku right now. I'd love this functionality, too, but it just
> doesn't seem to be possible yet. What you can do, though, is set a low
> expiration on the cached content. For example, if you use the example
> shown in the heroku http caching docs:
>
> response.headers['Cache-Control'] = 'public, max-age=300'
>
> Then whenever one of your users edits the content of a page, you can
> assure them that their contributions have been recorded, and that the
> page will be updated sometime in the next five minutes. Or you can do
> 1 minute, 30 seconds, or whatever interval you like.
>
> That'll be the most performant approach, but if you need more control
> than that you won't be able to use HTTP caching just yet. If you're
> using rails (you didn't mention whether you are) you'll want to look
> into action or fragment caching in the guide that Carl linked to. You
> won't be able to use page caching, though - heroku doesn't support it,
> and offers http caching as an alternative.
>
> On Apr 13, 12:42 pm, Carl Fyffe <[email protected]> wrote:
>
>
>
> > That isn't forcing an expire, that is "we clean up when you push, just
> > to let you know."
>
> > Please read this:http://tomayko.com/writings/things-caches-do
> > And then this:http://guides.rubyonrails.org/caching_with_rails.html
>
> > If you still can't figure it out, then come back. You should have a
> > better understanding and can ask a more pointed question.
>
> > On Tue, Apr 13, 2010 at 2:32 PM, Chap <[email protected]> wrote:
> > > Thanks for responding Carl,
>
> > > I've been going over the docs and the only way it mentions forcing an
> > > expire is deploying:
> > >http://docs.heroku.com/http-caching#cache-purge-on-deploy
>
> > > On Apr 13, 2:29 pm, Carl Fyffe <[email protected]> wrote:
> > >> There are much easier ways to expire a cache. The docs that explained
> > >> how to create the cache more than likely will tell you how to expire
> > >> it. Start there.
>
> > >> On Tue, Apr 13, 2010 at 2:23 PM, Chap <[email protected]> wrote:
> > >> > Need a button for a client to clear the cached version of a resource.
>
> > >> > As I understand it, redeploying and potentially "heroku restart" will
> > >> > cause this to happen.
>
> > >> > Is it possible for the app to restart itself? I wonder how people are
> > >> > handling this "immediate cache expire" problem.
>
> > >> > --
> > >> > 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 
> > >> > athttp://groups.google.com/group/heroku?hl=en.
>
> > > --
> > > 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 
> > > athttp://groups.google.com/group/heroku?hl=en.

-- 
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