Expire a page and its children?

Is there an easy way to expire a page and all its children?

For example, this page: http://biola.artofmission.com/news/ and all
its children need to be expired whenever a new page is posted in the
news section.

I was just going to do ResponseCache.instance.expire_response
(page.url) recursively, but I was hoping there was a more elegant way
to do it.

thanks,
ryan

Ryan,

Unfortunately that’s the only way to do it currently, assuming the
structure of your pages requires this. Unless you’re modifying the
cache length, the changes will propagate in 5 minutes, of course.

Sean

I guess also, I’d need to be able to expire a page’s parent, and all
the parent’s children. The case where that would be necessary is if
the title of the page was changed, so you’d need to regenerate the
navigation on all the pages in that section.

On Jun 21, 2007, at 4:02 PM, Ryan H. wrote:

thanks,
ryan


Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant


Ryan H.
Art of Mission, Inc.
3720 Gattis School Rd #800 PMB 245
Round Rock, TX 78664

800-722-1492 (phone)

www.artofmission.com
[email protected]

I guess at that point it’s almost easier to expire the entire cache! :wink:

Sean

Sean,

I guess at that point it’s almost easier to expire the entire
cache! :wink:

That’s a great point, but the only reason that I don’t want to expire
the whole cache is because it takes forever to regenerate each page.
I think the slowness is due to the way I have my navigation set up,
since it is doing a lot of iteration with if_children and
if_ancestor_or_self to build the navigation and sub-navigation menus.
At this point it takes as long as 2 seconds to render a page after
the cache is expired.

So I guess the issue is not how to creatively expire the cache, but
how to speed up the rendering of the navigation.

Has anyone done hierarchical navigation like this before? Is there a
more efficient way to do it?

Thanks!

On Jun 21, 2007, at 4:34 PM, Sean C. wrote:

I was just going to do ResponseCache.instance.expire_response
Site: http://lists.radiantcms.org/mailman/listinfo/radiant


Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant


Ryan H.
Art of Mission, Inc.
3720 Gattis School Rd #800 PMB 245
Round Rock, TX 78664

800-722-1492 (phone)

www.artofmission.com
[email protected]

Il giorno 21/giu/07, alle ore 23:02, Ryan H. ha scritto:

Is there an easy way to expire a page and all its children?

For example, this page: http://biola.artofmission.com/news/ and all
its children need to be expired whenever a new page is posted in the
news section.

You can use the dynamic extension:

http://darcs.bigchieflabs.com/radiant/extensions/dynamic/rdoc/

You set Dynamic as page type of News…and when you add/remove/update
a page under news, the page cache is cleared automatically…is it
what you need?


Andrea F.

[email protected]
http://bigchieflabs.com/blog/
http://think.bigchief.it

I was just going to do ResponseCache.instance.expire_response (
page.url) recursively, but I was hoping there was a more elegant way to
do
it.

Is there a way to execute arbitrary Ruby code directly inside a tag? 

Or
you are modifying a .rb file?

/AITOR