> We host a website. We use <cfcache cachedirectory="thedir"> on
> the index-page and the page that views articles based on an
> URL.id - simple and easy, and it works nicely.
>
> Ok... Now the customer changes the dynamic content on these
> pages and needs to update the cached pages. I first implemented
> the old way of doing it - deleting the tmp-files in the cachedir,
> but I suspect this caused a bit load on the server, as the pages
> would be updated quite often during a workday.
>
> Then I discovered action="flush". This does flush the pages quite
> nicely, BUT only if the physical template has changed! It appears
> that it doesn't catch that when the dynamic content has changed it
> should change the tmp-file. It only works if the template is resaved
> before flushing.
>
> Could anyone shed some light on this subject? Anyone using <cfcache>
> the way I'm trying to? Anyone ran into problems?
>
> The templates makes use of rather heavy queries, and the site has
> a lot of traffic. First the heavy queries had the server going slow
> in the busy hours, and this was resolved after applying <cfcache>.
> However, we have experienced a problem with the CF-server being
> unstable after this. Since deleting the tmp-files with <cffile> was
> not recommended, I hoped that
> <cfcache action="flush" directory="http://www.theurl/cache/">
> would solve it...
You're right about CFCACHE not detecting changes to your database. If it
could do that, it would have to query the database to check for those
changes, and you'd be right back where you started performance-wise.
If you want changes in your database to be reflected immediately in your
pages even if they're cached using CFCACHE, you'll need to add some logic to
the scripts which update the database - have them clear out the cache with
ACTION="FLUSH". Alternatively, you might decide that you don't need to show
updates immediately, and just figure out the best lifespans for your cached
pages.
Also, you have to specify a filesystem path, not a URL, in your CFCACHE
DIRECTORY attribute.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists