applicationscope, so take this into consideration when deciding the number of items to store.
maximumItemsToCachehas been reached.
n"), but you can set it to seconds ("
s") for example if you want more precise control over when a cached item should expire. For the rest of this chapter, we'll assume you've left it at the default setting.
true, CFWheels caches identical queries during a request. See the section titled Automatic Caching of Identical Queries below for more information about this setting.
true, CFWheels will clear out all cached queries when doing a
reload=truerequest. This is usually a good idea, but if you want to avoid hitting the database too hard on application reloads, you can set this to
falseto keep queries cached and ease the load on the database.
false, all plugins will reload on each request (as opposed to during
reload=truerequests only). Setting this is only recommended if you are developing a plugin yourself and need to see the impact of your changes as you develop it on a per-request basis.
reload=truerequest or restart the ColdFusion server, for example. The downside is that it makes for slightly slower development because the pages will not load as fast in this environment.
cacheDatabaseSchemais set to
false, you can add a field to the database, and CFWheels will pick that up right away. When
cacheModelConfigis false, any changes you make to the
config()function in the model file will be picked up. And so on.
browseByTitleactions for 30 minutes:
caches()function call goes inside the
config()function at the top of your controller file and accepts a list of action names and the number of minutes the actions should be cached for.
controller, action, key, and
paramsvariables. This means, for example, that paginated pages are all stored individually in the cache (because the URL variable for the page to display would be different on each request).
showArticlepage is cached and a user is adding a new comment to it.)
staticargument on caches() to
true. This will cache your content using the
cfcachetag behind the scenes. This means that the CFWheels framework won't even get involved with the subsequent requests until they expire from the cache again (please note that application events like
onRequestStart, etc. will run though).
browseByUseraction for 1 hour:
true, the default cache expiration time will be used.
userIdvariable for example, they will be cached separately.
updatedAtproperty on a user object and pass that in to
includePartial. As soon as it changes, CFWheels will recreate the cached content (since the cache key is now different).
cachedwithinattribute in the
<cfquery>tag. The query caching in CFWheels is very similar to this.
author, then you will likely write a lot of
article.author().name()calls. In this case, CFWheels is smart enough to only call the database once per request if the queries are identical. So don't worry about adding performance hits when making multiple calls like that in your code.