Code of CFCs in componentPaths isn't flushed by PagePoolClear() or SystemCacheClear(). This makes using the highly-performant "Inspect Templates: Never" setting impractical for many applications. Instead, we must use "Inspect Templates: Once".
1. Set Inspect Templates to "Never" in Lucee Web Admin.
2. Create the following files:
3. Visit index.cfm. See that it outputs "4".
4. Change the number returned by the get() method in number.cfc to 5.
5. Reload index.cfm. See that it still outputs "4". It should output 5.
6. Reload as many times as you want. Lucee will not pick up the change to number.cfc, even though PagePoolClear() and SystemCacheClear() are being called.
This problem only seems to affect CFCs in the application's componentPath array. A CFC in the same folder as index.cfm will not exhibit the problem.
I don't believe I have any lingering references to number.cfc. I've also tried with a separate flush.cfm script that just flushes the caches and that doesn't work either.
restarting the web context might be an workaround, but only if it doesn't result in many seconds of downtime.
Another symptom of the root problem may be that number.cfc isn't in the "page pool", as evidenced by dumping out PagePoolList() and seeing that it doesn't show up in that output. I'm not sure if that's a useful data point.
I think that might be a useful data point...
I just attached a copy of the test case as a zip file so it's easier to reproduce
i do not assume that this is the case here, i simply want to point out this piece of fact.
Thanks, ! I’ve verified that this change fixes the bug.
There may be a related regression in version 18.104.22.168. When I run the test twice, immediately after updating to 22.214.171.124, I get this error:
However, if I then restart Lucee. This error goes away. I’m not sure how to handle this, if at all. In my opinion, having to restart once after this upgrade is worth having a PagePoolClear() that really works.