ColdFusion Page Caching

Hello.  Would setting up page caching in the onRequestStart method of your Application.cfc file be useless or even dangerous in any way?  Most of the pages on our site are dynamic (random ads pulled on the front page and search results page based on users' entered criteria).

Also, on pages with static content, is it even worth doing client-side caching with the <cfcache> tag if your browser already does it?  If the user has caching turned off in their browser, would it still cache?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If you cache the page you risk not getting new data. If new ads will show up each time, you will not get them all. If the data on the screen can change with each request, I would not recommend caching. This is only for pages where the data does not change often.

I do not think there will be a difference using cfcache on a static page. It will generally improve server performance on dynamic pages.
varimerewebAuthor Commented:
Thanks silvera, but I'm a bit confused.  The first paragraph, you stated that it is not a good idea to cache pages with dynamic/changing content due to the risk of new data not being shown to the user, but the second paragraph, you stated it improves server performance to cache dynamic pages.  Please clarify.  Thanks!
If you are loading page data from a DB, but that data does not change often, caching can improve performance, because a new call to the db does not have to be made, it just shows the cached copy. If you are loading data that is changing all of the time (perhaps a news site) then you will improve performance, but may miss the new data, as that cached page will be displayed instead of going and getting the current data.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You should also know:

* You can cache sections of a page as opposed to caching the whole page.
   So you can have ads running on the top and side sections while caching the content that is static.

*  Also there is an option to cache on client(browser) or web server in the cfcache attributes.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.