Skip to content

Instantly share code, notes, and snippets.

Created May 2, 2017 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3b31308d1ac47211d8e4347c30998a2e to your computer and use it in GitHub Desktop.
Save anonymous/3b31308d1ac47211d8e4347c30998a2e to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
people = queryNew("id,name,mail,showtime", "integer,varchar,varchar,timestamp", [
[1, "weed", "weed@theflowerpot.not", now()],
[2, "bill", "bill@theflowerpot.not", now()],
[3, "ben", "ben@theflowerpot.not", now()]
]);
writeDump(var=people, label="initial");
cacheAfterThis = dateAdd("s", 2, now());
peopleToCache = queryExecute(
"SELECT * FROM people",
[],
{dbtype="query", people=people, cachedAfter=cacheAfterThis}
);
writeDump(var=peopleToCache, label="to cache");
sleep(5000);
peopleFromCache = queryExecute(
"SELECT * FROM people",
[],
{dbtype="query", people=people, cachedAfter=cacheAfterThis}
);
writeDump(var=peopleFromCache, label="from cache");
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment