CF Snippets

Configure Query Caching

Use the cachedWithin or cachedAfter query options to cache a query for or after a specified timespan. This query will be cached and reused for up to 6 hours.

var sql = "SELECT * FROM users";
var queryOptions = {
  cachedWithin: createTimespan( 0, 6, 0, 0 )
};
var data = queryExecute( sql, params, queryOptions );