Skip to main content
paulm1677332
Inspiring
October 27, 2024
Question

CF 2023 caching query

  • October 27, 2024
  • 3 replies
  • 979 views

Hi,

We are testing upgrading from CF2018 to 2023 and have noticed some odd behaviour when saving forms over and over. We have a form which updates a table in the database and when updating the values a number of times in a short space of time the values on the screen aren't matching whats in the database. The values save fine to database but when they reload the form it should have the saved values which are called via a query at the top of the page. I assume this is some caching but I havent specified any caching in the query and haven't changed anything in the Coldfusion Administrator in caching section. Its all just default values there. I've tested it on CF2018 and I can save and save and everything reloads as expected. I can understand how this may happen if I used 'cachedWithin' in the query object as the query is the same each time but it should return something different each time as we are saving the form and updating the values for that table. Anyone noticed anything similair before?

 

Thanks

This topic has been closed for replies.

3 replies

Charlie Arehart
Community Expert
Community Expert
November 3, 2024

I realize this is a few days after your original question, but assuming the problem remains (and beyond the ideas shared so far by bkbk and Dave), I want to turn our attention to your presumption that this a "cf2023" problem. Until you can offer a test case that allows us to prove that ourselves (between our own cf2018 and cf2023), I have a different question.

 

You say your cf2023 is on docker on aws. What's your cf2018 setup? Is it also a docker image? (Adobe did offer docker images for cf2018 originally.) Either way, it at least also on aws? (There could be some facet unique to that which would not happen otherwise.) Is the OS st least the same between the two cf instances (I don't expect that should change how the features work. I'm just helping consider possibilities.) 

 

Indeed, are both cf instances talking to exactly the same database, and using the same driver type in cf? And what are your update levels for cf2023 and 2018? In particular, are you testing cf2023 update 11, since that has dozens of bug fixes. (And yes, Adobe has released a container image with update 11 pre-installed which should make it easy for you to try.) 

 

I realize you may not want to "play 20 questions ". As I said, if you could offer some small example code (that is standalone and allows us to recreate your results) that could let us skip most of those considerations, if we could confirm it was SOLELY about cf2018 vs cf2023. Until then, perhaps these will help you find the cause of your different behavior. 

/Charlie (troubleshooter, carehart. org)
Community Expert
October 29, 2024

You should enable debug output for both environments. See what's going on behind the scenes in each. This might help you post useful code snippets and CF administrator settings.

 

Dave Watts, Eidolon LLC
BKBK
Community Expert
Community Expert
October 27, 2024

Hi @paulm1677332 , it does indeed look like a caching issue. In any case, what or whom do you mean by "they" in the statement, " ... when they reload the form it should have the saved values which are called via a query at the top of the page" ? The process of course depends on how the form is refilled and re-submitted. For example, does a user refill the form, then press the submit button?

paulm1677332
Inspiring
October 27, 2024

Hi @BKBK The form actually submits to itself with logic at the top to determine if it's been submitted. Below this then in the code is the 'get' which would query the db for values needed in the form. I forgot to mention that I was able to go out of the form to another page then back to it and still same old values displaying but values in the db were correct. Only when I logged out and back in again and loaded the form did it have the updated values.

paulm1677332
Inspiring
October 27, 2024

Just for more context. This is running via latest 2023 image from docker in AWS. I've been playing around with other pages too and seeing more query related issues. I have various counts against items on the homepage (counts returned via db query) I made changes there which should see one of those values increase each time which it did. So originally the count was 0 but I added 2 items and each time the counter displayed went up to 2 as expected. Then I added a third and value stayed at 2. Refreshed a number of times and then it went to 0! Then refreshed again and went back to 2. Eventually after going into another page and back again a couple of times it went to 3. No consistency to whats coming back from the query.