> Brilliant - I'll be downloading that and plugging it in to my fusebox custom
> cache verb. Should be a snap :) One thing I have done in Fusebox is to
> create two custom verbs (I initially wrote caching into the core but figured
> a more pluggable way to do it):

Thanks Dom. :) The comment replacement trick is really neat, I like
that. I'm not sure if that solution would have occurred to me either,
but it's really slick and sounds like it would work well for Fusebox in
particular. I had been noodling with the idea of using AJAX for that
kind of thing and then you're actually caching the original AJAX code
and it's running out and hitting an event that's not cached in your app.
That's problematic though because of Section 508 and because the AJAX
section would load slower and the more AJAX you have loading right
up-front when the page loads, the slower you are to get the whole page.
(I've seen that happen at a company I worked for in Portland, where they
put AJAX all over a portal page ostensibly to speed up the page and then
people started complaining about it being slow.) So although the AJAX
thing is still an option, the no-cache tag sounds much more bulletproof.
:)

> <cache> (works kinda like cfcache) and <no-cache>. I came up with the
> no-cache solution when trying to cache whole pages and quickly realising why
> that wouldn't work well because of little spots in pages that couldn't be
> cached. I then went around caching every element of the page individually
> but that started causing real headaches. The cleanest solution for me was to
> add the <no-cache> verb, that allows you to cache like this:
> 
> <fuseaction name="fubar">
> <cache agent="myPageCacheAgent">
>  <do action="someFuseaction" />
>  <do action="someOtherFuseaction" />
> </cache>
> </fuseaction>
> 
> <fuseaction name="someFuseaction">
>  <no-cache>
>   <include template="noncacheablecontent" />
>  </no-cache>
> </fuseaction>
> 
> <fuseaction name="someFuseaction">
>   <include template="cacheablecontent" />
> </fuseaction>
> 
> Under the hood, this will cache everything between the cache tags. However,
> when the no-cache tag is encountered an html comment is wrapped around the
> content. When the cached content is output, this commented code is replaced
> by the output of doing the non cacheable fuseaction (the fuseaction name is
> embedded in the comment).
> 
> Anyways, thought I'd mention that as I have found this approach incredibly
> useful.


-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 817.385.0301

http://onTap.riaforge.org/blog



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326198
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to