Forum: Ruby on Rails expires_in with fragment-caching

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0964ce57bab3b3c1c7adf651d4a5a2a4?d=identicon&s=25 Christoph Thommen (sigma)
on 2008-12-29 15:19
(Received via mailing list)
Hi all

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

Thank you for your aswers!

Chris
C9b13a4e02d9b1e3ab4950a8bf73cc92?d=identicon&s=25 gautam chekuri (Guest)
on 2008-12-29 16:47
(Received via mailing list)
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
C9b13a4e02d9b1e3ab4950a8bf73cc92?d=identicon&s=25 gautam chekuri (Guest)
on 2008-12-29 16:47
(Received via mailing list)
If you are using rails 2.1 && memcached, then you can do this :

<% cache(key, :expires_in => 5.minutes) do %>
  hello, world
<% end %>
96146b7a23174e2e024c06a49f845bb8?d=identicon&s=25 Jeffrey L. Taylor (Guest)
on 2008-12-29 22:11
(Received via mailing list)
Quoting sigma <christoph.thommen@gmail.com>:
>
> 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
341a3b654410ec7f65c68daae266410d?d=identicon&s=25 Andi Cutman (axgle)
on 2009-03-09 10:09
Jeffrey L. Taylor wrote:
> Quoting sigma <christoph.thommen@gmail.com>:
>>
>> 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
This topic is locked and can not be replied to.