Created
May 2, 2017 15:12
-
-
Save anonymous/3b31308d1ac47211d8e4347c30998a2e to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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