Odd question. What would you think the cachedwithi...
# cfml-general
d
Odd question. What would you think the cachedwithin attribute would be on an insert or update query?
r
Unless this is a trick question, my initial response would be “A really bad idea”…
m
Just a thought but maybe as a cheap way of concurrency protection. There are a lot better ways, and I don't even know if it would work honestly..
d
I'm seeing that with cachedwithin there, an update that only modifies one integer column doesn't do anything IF the value it's setting is null. Works if it's an integer, and works as expected if I remove cachedwithin. Really odd. What's odder still is that I wrote that code. It's been that way for a long time, and have no idea what I was trying to do, if anything, could have been a random copy-paste or something. (I'm probably not supposed to admit such things on the public internet, lest I ever be looking for a job again...) In my defense, the column in question wasn't part of that query until today, so this scenario was never tested until just now, when I scratched my head as to why it wouldn't save that null. Peculiar behavior, on both CF's part and apparently mine...
r
I get that same feeling when I look at some of my code, “WTH was I thinking…”