public class CompiledScriptCache
extends java.lang.Object
Wraps a GroovyClassLoader for a single Site that may cache compiled
Groovy scripts (it'll only cache them if this is a production site).
If the site is assocated with a Product then that Product's shared script
will also be included in each cached script here so, whenever you make changes
to the Product then you should also blow away this object for each applicable
site and create a new one.
Having a separate class loader for each Site means that the Java classes that
are eventually generated for each Script block can be kept together in one
place and, when we delete/GC the class loader, the permgen memory that's used to
store the class definitions can be released.
- Author:
- michael