rubyonrailsin

A Ruby and Rails talk

Wednesday, March 24, 2010


Re: [Radiant-Dev] Expiring page in Radiant::Cache

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

On 24 Mar 2010, at 14:21, 31 30 wrote:

> With the move to Radiant::Cache, Andrea Franz's DynamicPage extension
> no longer works.
>
> The key section is:
>
> cache = ResponseCache.instance
> self.ancestors.each do |ancestor|
> cache.expire_response(ancestor.url) if ancestor.class_name
> == 'DynamicPage'
> end
>
> Can someone give me a hint as to the appropriate replacement for
> ResponseCache.instance.expire_response() using the new Radiant::Cache
> implementation ?

At the moment there's no way to remove a single url from Rack::Cache. It's not really meant to work that way. To use it properly we need a lightweight way to check etags and invalidate stale cache entries.

I believe the only way to get rid of a cache entry with current versions of radiant is to call Radiant::Cache.clear.

best,

will

--
Radiant CMS Dev Mailing List
Post: radiantcms-dev@googlegroups.com
Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
Group Site: http://groups.google.com/group/radiantcms-dev/

To unsubscribe from this group, send email to radiantcms-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive