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 <carl.fy...@gmail.com> 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 <chapambr...@gmail.com> 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 <carl.fy...@gmail.com> 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 <chapambr...@gmail.com> 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 her...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > heroku+unsubscr...@googlegroups.com.
> >> > 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 her...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > heroku+unsubscr...@googlegroups.com.
> > 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 her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to