Intro to Caching
Daria Norris
NCDevCon
May 22, 2010
Why Me?
Working with ColdFusion since 1996
Independent Contractor 13 yrs
Currently work for Free Library of Philadelphia
Why Do We Cache?
Performance
Caching Tools in ColdFusion
Persistent scopes
<cfquery> with cachedwithin or cachedafter
<cfcache>
Cache within an object (CFC)
CF9's enhanced caching functions
Persistent Scopes
Session
Application
Client
Server
Query Caching
<cfquery>
cachedAfter=
cachedWithin=
Page Caching
<cfcache>
timespan=
Caches entire page
Cache managed by URL variables
Enhanced for CF9
Object Caching
CFCs created as objects
Usually cached into a persistent scope
Typically called Services
Fragment Caching
cachePut()
cacheGet()
cacheRemove()
cacheGetAllIds()
cacheGetMetadata()
cacheGetProperties()
cacheSetProperties()
Finding the Optimal Caching Plan
Cache as close to final output as possible
Cache to static files when possible
Monitor your cache size
Resources
Ray Camden
http://www.coldfusionjedi.com/
Rob Brooks-Bilson
http://www.brooks-bilson.com/
Adobe
http://help.adobe.com/
To download the sample code, click on 'Show Menu' and click on the paper clip.
Posted By: Daria On: 06/02/10 5:13 PM