Different Cache and Performance settings to improve overall performance
We’d like to be able to toggle between Never and Always depending on our deployment environment. Specifically, in a Docker world I want Never on in production and Always on when developing.
This doesn’t appear to be possible at the moment using environment variables but is flagged for implementation as part of the nominated improvements to configuration:
Getting all the options articulated in environment variables I think is going to be hard and probably not all that useful (see below for config screens) – perhaps, why it’s still not implemented.
My assumption is that higher levels, such as Server act as a simple default for the eventual resource mapping, assuming some sort of implicit resource mapping for files not explicitly mapped.
Server -> Web Context -> Resource Mapping
From our perspective, we only need environment variables to nominate defaults at the top level. We don’t need to nominate specific settings at the web context (of which there can be many) or the resource mapping (of which there are many) levels via the environment.
We are quite happy to set specific values (for example for a resource mapping) via code in the Application.cfc
.
I’d make the argument that all we really need is a “top level” default set in the ENV variables:
[yuml]
[ENV] → [Server]
[Server] → [Web Context]
[Web Context] → [Resource Mapping]
[/yuml]
Using a super simple string like:
LUCEE_INSPECT_TEMPLATES=never/once/always
For example, you might set this for your development environment via docker-compose.yml like so:
lucee52:
build: ./5.2
ports:
- "8052:8888"
environment:
- 'LUCEE_INSPECT_TEMPLATES=always'
- 'LUCEE_ENABLE_DIALECT=true'
- 'LUCEE_FULL_NULL_SUPPORT=true'
And enforce Never by default using your Dockerfile
:
FROM lucee/lucee52:latest
ENV LUCEE_JAVA_OPTS "-Xms512m -Xmx1024m"
ENV LUCEE_INSPECT_TEMPLATES "Never"
Administrator Screens
Server Settings
Web Context Settings
Resource Mapping Specific Settings