Greg's Blog

helping me remember what I figure out

cachedWithin

| Comments

Tasked with optmising an application I decided to first look at my queries (based on the adage that the database is the bottleneck) and yes some of the queries were running a little slow, and since the data displayed wasn’t changed all to frequently I thought it a good idea to cache these queries. The first thing I decided to do was make use of the cachedWithin attribute of the cfquery tag. However this yielded a small surprise: You cannot use it if you are using cfqueryparam in the same query. Sadly there was no mention of this in the documentation for the cfquery tag, however there was a mention about it in the Livedocs, which again highlights the importance of checking the LiveDocs first.

As an aside under the comments there was also this little link to more thorough listing of data types for CFSQLTYPES across RDBMSs.