Manage Caches
There are three commands to manage Lucee/Railo caches.

List existing caches

1
# Lucee server context of the CommandBox server in the current directory
2
cfconfig cache list
3
4
# Lucee web context of the CommandBox server in the current directory
5
cfconfig cache list fromFormat=luceeWeb
6
7
# Target a CommandBox server by name
8
cfconfig cache list from=serverName
9
10
# Target an externally installed server
11
cfconfig cache list from=/path/to/server/home
Copied!
To receive the data back as JSON, use the --JSON flag.
1
cfconfig cache list --JSON
Copied!

Edit an existing or create a new cache

Add a new cache or update an existing cache. Existing caches will be matched based on the name. You can use a the type parameter as a shortcut for specifying the full Java class, which may change between versions.
1
cfconfig cache save myCache RAM
2
cfconfig cache save name=myOtherCache type=EHCache
3
cfconfig cache save name=myCache type=EHCache to=serverName
4
cfconfig cache save name=myCache type=RAM to=/path/to/server/home
Copied!
Alternatively, specify the full class name.
1
cfconfig cache save myCache lucee.runtime.cache.ram.RamCache
2
cfconfig cache save name=myCache class=lucee.runtime.cache.ram.RamCache to=serverName
3
cfconfig cache save name=myCache class=lucee.runtime.cache.ram.RamCache to=/path/to/server/home
Copied!
If your cache provider expects custom properties, pass them as additional parameters to this command prefixed with the text custom:. This requires named parameters, of course.
1
cfconfig cache save name=myCache type=RAM custom:timeToIdleSeconds=0 custom:timeToLiveSeconds=0
Copied!

Delete an existing cache

Identify the cache uniquely by the name.
1
cfconfig cache delete myCache
2
cfconfig cache delete myCache serverName
3
cfconfig cache delete myCache /path/to/server/home
Copied!