Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/225c9ceb47c6f7950e64e630cbadbb36 to your computer and use it in GitHub Desktop.
Save trycf/225c9ceb47c6f7950e64e630cbadbb36 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
cache_time = createTimeSpan(1,0,0,0);
function foo(args) cachedwithin=cache_time{
return args;
}
writeDump( foo('test') );
/*
queryExecute(
sql: "
SELECT *
FROM table
WHERE param1 = :param1
AND param2 = :param2
",
params: {
param1 = {value = "antani", cfsqltype = "varchar"},
param2 = {value = 2, cfsqltype = "integer"}
},
options: { cachedwithin: cache_time } // <----- this works!
);
/*
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment