Expires_in with fragment-caching


#1

Hi all

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

Thank you for your aswers!

Chris


#2

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

#3

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

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


#4

Jeffrey L. Taylor wrote:

Quoting sigma removed_email_address@domain.invalid:

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


#5

Quoting sigma removed_email_address@domain.invalid:

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