Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Feb 11, 2025
1 parent ebc9ea5 commit 26479b8
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 5 deletions.
8 changes: 8 additions & 0 deletions docs/00.home/homepage.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ To find out more about getting involved as a developer with Lucee, checkout our

**New!** We have added a whole series of detailed [[Recipes]] showing you how to take advantage of the wide range of features in Lucee.

## Deploying Lucee

[[deploying-lucee-server-apps]] - How to configure and deploy Lucee

[[locking-down-lucee-server]] - Security best practices for Lucee

[[config]] - All about Lucee's configuration file

## Lucee 6.2

Lucee 6.2 is our upcoming next major release, currently at the Release Candidate stage, including enhanced Java and Maven integration, Jakarta Servlet support and better runtime performance, up to 50% faster than Lucee 5.4.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ Make sure the WEB-INF directory is locked down. You will need to configure your

To disable detailed error messages in Lucee, log in to the Lucee server administrator and go to Settings -> Error -> and select "error-public.cfm" from the drop down options. This will only display an extremely generic and uninformative error message to the end-users.

```
{
"errorGeneralTemplate": "/lucee/templates/error/error-public.cfm",
"errorMissingTemplate": "/lucee/templates/error/error-public.cfm"
}
```

### Ensure All Administrators for All Contexts Have Passwords Assigned and Use Captcha ###

In the Lucee Server Administrator, go to Security -> Password. From this screen you can set the passwords of all existing web contexts and enable captcha's to prevent brute-forcing password breaking attempts on your Lucee Server & Web Administrators

The Lucee Admin can be disabled by setting the env var `LUCEE_ADMIN_ENABLED=false` which is **recommended** for production/internet facing servers

### Reduce Request Timeouts as Low as Possible ###

To change the Request Timeout value, log in to the Lucee server administrator and go to Settings -> Application -> Request Timeout. It is recommended you change it from 50 seconds to about 10 or so. Experiment with this to make sure the request timeouts do not effect needed functionality that may exist in your application.
Expand Down
1 change: 1 addition & 0 deletions docs/04.guides/12.deploying-lucee-server-apps/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ related:
- locking-down-lucee-server
- relocating-web-inf
- cookbook-check-for-changes
- config
forceSortOrder: '22'
---

Expand Down
46 changes: 41 additions & 5 deletions docs/recipes/supercharge-your-website.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@

# Supercharge your website

This document explains how you can improve the performance of your website in a very short time with Lucee.
How to improve performance of your production Lucee website using never inspect templates.

## Background

By default, when a source file has changed, Lucee will detect that change and recompile it, before executing it.

This is great when you are developing, but it's usually not needed for production servers, as you can imagine, checking every files for changes, does slow down performance.

For production servers, if you know your server does not produce or change any source files, using Inspect Templates `NEVER` avoids that overhead.

## Example:

Expand All @@ -27,20 +35,48 @@ This document explains how you can improve the performance of your website in a
writeDump(now());
```

Run the above index.cfm, and you get a timestamp. Whenever we call our file, Lucee checks once at every request if a file has changed or not (for files currently residing in the template cache). If a file has changed, Lucee recompiles it, and executes it. Checking the files at every request takes time. If you have a published server, and you know your server does not produce or change any files, you can simply avoid that check that happens all the time.
Run the above `index.cfm`, and you get a timestamp. Now change that file and call it again, the changes are automatically picked up.

Whenever we call our file, by default, Lucee checks once at every request if a file has changed or not (for files currently residing in the template cache).

## Using Admin
## Setting InspectTemplates to NEVER using the Lucee Admin

- Go to _Admin -> Performance/ Caching -> Inspect Templates (CFM/CFC) -> Never_

- The default is "Once", checking any requested files one time within each request. You should check "Never" to avoid the checking at every request.

- Change the index.cfm and run it again. No changes happen in the output because Lucee does not check if the file changed or not. Now, let's see the faster execution and less performance memory being used.
- Change the `index.cfm` and run it again. No changes happen in the output because Lucee does not check if the file changed or not. Now, you'll see the faster execution and less performance memory being used.

- You can clear the cache by code using `pagePoolClear()`. This clears all template cache so that Lucee will check again if the template has changed. On the next request, Lucee will check initially for the file.
- You can flag all cached templates to be checked once for changes using [[function-inspectTemplates]]. This is more efficent than [[function-pagepoolclear]] which clears the entire template cache, requiring every single template to be recompiled.

- Another option to clear the template cache is to use clear cache via the admin by clicking the button in _Admin -> Settings -> Performance/ Caching -> Page Pool Cache_.

Remember, the Lucee Admin is simply a GUI which edits `CFconfig.json`. It's written in CFML and if you want to do something the admin does, have a look at the source code.

## Setting InspectTemplates to NEVER using CFconfig.json

```
{
"inspectTemplate": "never"
}
```

The `inspectTemplates` setting can also be configured per mapping, by default mappings inherit the server default.

```
{
"mappings": {
"/testbox": {
"physical": "d:\\work\\TestBox",
"primary": "physical",
"topLevel": "true",
"readOnly": "false",
"inspectTemplate": "never"
}
}
}
```

## Footnotes

Here you can see these details on video also:
Expand Down

0 comments on commit 26479b8

Please sign in to comment.