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.
Carl L. (Guest)
on 2006-05-29 06: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
Steve O. (Guest)
on 2006-05-31 04: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
Scott W. (Guest)
on 2006-05-31 05: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 O. <removed_email_address@domain.invalid>
To: removed_email_address@domain.invalid
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 L. <removed_email_address@domain.invalid > 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
removed_email_address@domain.invalid
 http://lists.rubyonrails.org/mailman/listinfo/rails
Philip H. (Guest)
on 2006-05-31 22: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
Jonathan W. (Guest)
on 2006-06-01 16: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.