3

Today, no matter what I did, my application just would not recognise a change I did to a file I uploaded. I even put a cfabort at the top of the page and it just ignored it. Now, this is a production server, so there were some things I normally have to do for the fusebox framework to load the new pages. However, all the usual processes failed and I even tried numerous others. Let me list them:

Normal Process:

&fusebox.parseAll=1&fusebox.password=whatever <- Did not work
&fusebox.load=1&fusebox.password=whatever <- Did not work

Other things I tried:

* changed mode from production to development-full-load <- Did not work
* called onApplicationStart to reset app <- Did not work
* changed the application name to reset app <- Did not work
* deleted parsed folder and regenerated <- Did not work

No matter what I did (they may have been more that I just don't recall at present) nothing would refresh the page. The only thing that worked after I was at my wits end, was to stop the Railo server, restart it and then run the thing I tried first again, being: &fusebox.parseAll=1&fusebox.password=whatever

That worked. So my only assumption can be that somehow, somewhere in the one of the applications, the cached code was being used to regenerate the parsed files instead of the actual updated file.

Has anyone experienced this before and do you have any solutions to avoid this. I can not keep restarting my production application just to update a changed file.

Thanks

Peter Boughton
  • 110,170
  • 32
  • 120
  • 176
Paolo Broccardo
  • 1,942
  • 6
  • 34
  • 51

1 Answers1

3

From what you've said it sounds like Trusted Caching may be turned on, which is an odd name but basically means "I trust that these files will not change, so don't bother checking" or something like that. The main thing is it doesn't look at your cfm/cfc files for changes, which is faster, but of course very annoying when you make changes.

On Railo, that can happen at the per-mapping level, so first thing is to check all your mappings to see if the "Trusted" option is enabled - unless your site is high enough traffic that it's beneficial, for a Fusebox app it's probably more hassle than it's worth - so for any relevant mappings, unless you specifically need it, go ahead and disable it.

There is also a similar global caching option - in Railo Web Admin, go to Settings>Performance/Caching and most likely you want to have "Inspect Templates" set to "Once". If it is set to "Never", this is same as Trusted cache, which again is faster but not best for a changing site. However, you may have noticed there is a "Clear template cache" button below - if you prefer to keep it on "Never" you can press this button each time the code changes, and it will rebuild the cache with the latest files.

Peter Boughton
  • 110,170
  • 32
  • 120
  • 176
  • 1
    Hi Peter.Thanks again for the great insight. In this case, Inspect Templates was set to "Once", so that was not the problem. Next I moved on to the Fusebox Mapping, which was set to "trusted" and once I unchecked that, the page refreshed as required. So that was the culprit. At least now for future I know what to do when upgrading. It would also explain why I never had this issue on my development and staging servers - they don't use fusebox mappings.It's only my live site that's set up this way.And yes, I know, staging should be setup exactly the same as production-next on my to do list :) – Paolo Broccardo Nov 11 '10 at 13:09