Code of CFCs in componentPaths isn't flushed by PagePoolClear() or SystemCacheClear()

Description

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".

To reproduce:
1. Set Inspect Templates to "Never" in Lucee Web Admin.
2. Create the following files:

Application.cfc:

objects/number.cfc:

index.cfm

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.

Environment

Ubuntu 16.04
Apache 2.4

Activity

Show:
Leon Miller-Out
August 8, 2018, 2:47 PM

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.

Zac Spitzer
August 9, 2018, 10:36 AM

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

Michael Offner
August 20, 2018, 2:34 PM

i do not assume that this is the case here, i simply want to point out this piece of fact.

Michael Offner
May 20, 2019, 3:02 PM
Leon Miller-Out
May 21, 2019, 1:36 PM

Thanks, ! I’ve verified that this change fixes the bug.

There may be a related regression in version 5.3.3.41. When I run the test twice, immediately after updating to 5.3.3.41, 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.

Fixed

Assignee

Michael Offner

Reporter

Leon Miller-Out

Priority

Critical

Labels

Fix versions

Sprint

None

Affects versions