Template caching in Lucee

In CF9’s template caching and it seems that after a CFM/CFC gets compiled
into a class file that it seems to toss that into the PermGen memory in
Java. This makes it super hard to push code to a high traffic server
without user impact. We’ve gotten better at it but still throws off some
users.

As we dive into Lucee we are wondering how the Lucee saves these java files
and loads them into memory for performance caching.
What are the best settings for caching templates on a high traffic server?
When we push out new code how does Lucee recognize that?
What is the best workflow in your opinion of using the PagePoolClear()
function? I assume this is the trigger that clears those cached templates

In CF9’s template caching and it seems that after a CFM/CFC gets
compiled into a class file that it seems to toss that into the PermGen
memory in Java. This makes it super hard to push code to a high
traffic server without user impact. We’ve gotten better at it but
still throws off some users.
you should configure the Java Agent, which will allow Lucee to re-use
the class files rather than toss away the whole class loader tree.
also, consider upgrading to Java 8 which does not have the PermGen model
anymore, and therefore works much more efficiently and reliably.

As we dive into Lucee we are wondering how the Lucee saves these java
files and loads them into memory for performance caching.
Lucee creates a .class file and saves it to
/WEB-INF/lucee/cfclasses/{path-based-on-original-path}

When we push out new code how does Lucee recognize that?
that depends on your settings. for files that are inspected once or
always, the timestamp on the class file is compared with the timestamp
of the source file. for files that are never inspected you have to
refresh manually

What is the best workflow in your opinion of using the PagePoolClear()
function? I assume this is the trigger that clears those cached templates
PagePoolClear() is a good way to handle it, yes. another way is via the
Admin under Performance/Caching and clicking the button labeled “Clear
Page Pool Cache”. you can always add something like this to the
beginning of your Application.cfc’s onRequestStart():

function onRequestStart() {

if (CGI.REMOTE_ADDR == “127.0.0.1”) // overly simplified for
example purposes
if (URL.keyExists(“refreshCode”))
PagePoolClear();

// more code here
}

then call your app with ?refreshCode from an allowed IP

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 8/11/2015 11:59 AM, John Blayter wrote:

In CF9’s template caching and it seems that after a CFM/CFC gets
compiled into a class file that it seems to toss that into the PermGen
memory in Java. This makes it super hard to push code to a high
traffic server without user impact. We’ve gotten better at it but
still throws off some users.

As we dive into Lucee we are wondering how the Lucee saves these java
files and loads them into memory for performance caching.
What are the best settings for caching templates on a high traffic server?
When we push out new code how does Lucee recognize that?
What is the best workflow in your opinion of using the PagePoolClear()
function? I assume this is the trigger that clears those cached templates

See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get
your ticket NOW - http://www.cfcamp.org/

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/b833e28f-0283-4016-a08b-cf6709a8a5ed%40googlegroups.com
https://groups.google.com/d/msgid/lucee/b833e28f-0283-4016-a08b-cf6709a8a5ed%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.