Forum: Ruby on Rails Time-based cache fragment expiration

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.
D566a291d8ee7c013649e47b3769d981?d=identicon&s=25 Carl Lerche (Guest)
on 2006-05-29 04:07
(Received via mailing list)
Hello,

I'm trying to figure out how I could implement fragment caching that
expires every x amount of time. I thought of writing a runner script
that would expire the cache and set it as a cron job, but that
doesn't really work because runner scripts act on models and not
controllers.

Does anybody have any ideas?

Regards,
-carl
E98de78bb42013c488fe8aa9d77d2cb1?d=identicon&s=25 Steve Odom (Guest)
on 2006-05-31 02:16
(Received via mailing list)
I was hoping someone would jump in here with the solution. I had the
same
problem and couldn't figure it out. I ended up just using a cron job to
delete them.

Steve
http://www.trivionomy.com
http://www.smarkets.net
1b275ea705cc1671f13105d29684cbec?d=identicon&s=25 Scott Walter (sfwalter)
on 2006-05-31 03:06
(Received via mailing list)
I believe the Typo project has done what you need.  Take a look at
http://www.typosphere.org/trac/browser/trunk/vendo...

I've been meaning to implement this, but its low on my priority list.

cheers,

scott

----------------------------------------------------------------------------------------------------
What's an Intel chip doing in a Mac? A whole lor more that it's ever
done in a PC.

My Digital Life - http://scottwalter.com/blog
Pro:Blog - http://scottwalter.com/problog
Snippets  - http://snippets.scottwalter.com

----- Original Message ----
From: Steve Odom <steve.odom@gmail.com>
To: rails@lists.rubyonrails.org
Sent: Tuesday, May 30, 2006 7:15:44 PM
Subject: Re: [Rails] Time-based cache fragment expiration

I was hoping someone would jump in here with the solution. I had the
same problem and couldn't figure it out. I ended up just using a cron
job to delete them.

Steve
http://www.trivionomy.com
http://www.smarkets.net

On 5/28/06, Carl Lerche <carl.lerche@verizon.net > wrote:Hello,

I'm trying to figure out how I could implement fragment caching that
expires every x amount of time. I thought of writing a runner script
that would expire the cache and set it as a cron job, but that
doesn't really work because runner scripts act on models and not
controllers.

Does anybody have any ideas?

Regards,
-carl
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2006-05-31 20:37
(Received via mailing list)
> Hello,
>
> I'm trying to figure out how I could implement fragment caching that expires
> every x amount of time. I thought of writing a runner script that would
> expire the cache and set it as a cron job, but that doesn't really work
> because runner scripts act on models and not controllers.
>
> Does anybody have any ideas?

I haven't done extensive testing, but we use memcache to store
sessions/fragments and with some minor tweaks you can pass along an
expiration time (ie. expire automatically in 10 minutes)...

The automatic expiration is a part of memcache... if you're interested
let
me know and I'll write it up.

-philip
6805b35d0a8ea3ede0a7da2d4cf5ae77?d=identicon&s=25 Jonathan Weiss (Guest)
on 2006-06-01 14:41
(Received via mailing list)
I've done it with using MemCached as a cache backend and described it
here:


http://blog.innerewut.de/articles/2006/02/09/time-...

Jonathan
This topic is locked and can not be replied to.