• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using <cfcache>

In many applications, templates are built dynamically every time a page is requested. But often a ColdFusion template stays the same every time it's requested. An example of this scenario is a home page that has no personalized content. Why should the page be built dynamically from the ColdFusion template when it rarely changes? This is a good question, and the <cfcache> tag can help resolve the issue.

When the <cfcache> tag is used on a page, it creates a separate file of the HTML code that the page generates. When the page is requested next, the tag sends the Web server the generated HTML code that was saved earlier, rather than dynamically rebuilding the page. This means that complete pages that do not change often can be cached, thus saving processing time and improving performance.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint