Expires_in with fragment-caching

Hi all

Is it posible do have a expires_in with fragment-caching? Does this
work with memcached?

Thank you for your aswers!

Chris

Chris,

  1. If you are running rails 2.1 && memcached then you can do this in
    fragment caching:

<% cache(key, :expires_in => 5.minutes) do %>
hello, world!
<% end %>

  • Gautam

If you are using rails 2.1 && memcached, then you can do this :

<% cache(key, :expires_in => 5.minutes) do %>
hello, world
<% end %>

Jeffrey L. Taylor wrote:

Quoting sigma [email protected]:

Hi all

Is it posible do have a expires_in with fragment-caching? Does this
work with memcached?

Yes, though memcached is the only mechanism it is already built-in.
There is
a way that works with the other three mechanisms (I think, I’ve only
tried it
with memory_store). If anyone is interested, I’ll post it on my blog.

Jeffrey

hi,I’m interesting.where your blog

Quoting sigma [email protected]:

Hi all

Is it posible do have a expires_in with fragment-caching? Does this
work with memcached?

Yes, though memcached is the only mechanism it is already built-in.
There is
a way that works with the other three mechanisms (I think, I’ve only
tried it
with memory_store). If anyone is interested, I’ll post it on my blog.

Jeffrey