Configuration
Learn how to configure the extension for operation
Last updated
Learn how to configure the extension for operation
Last updated
Once the extension is installed, you can begin to create cache connections and configure them either via the administrator, via the Application.cfc or via a CFConfig json file.
To add a new cache, click on Services > Cache
and you should see a list of existing caches. If there are no existing caches, you should be taken straight to the create
screen.
You have two cache options with our extension:
Ortus Redis Cache : For standalone or connecting to a single Redis instance
Ortus Redis Cluster Cache : For connecting to a Redis Cluster
You will then be taken to a page of options for each of the Redis Cache implementations.
The RedisCache
is used for connecting to a single instance of Redis. That instance could be replicated, but that's another story. Let's check out the different options:
Check the Storage
box if you want to be able to use this cache for session or client storage distribution.
Enter the Redis server IP address or host name.
The port of the Redis server.
The logical database to connect to in Redis. By default we connect to database 0.
The Redis cluster username - only used when enabling user-level access.
The password of the Redis server, if any.
Enable SSL on the connection to the Redis Server.
The time in milliseconds to wait for a connection or throw an exception.
The cluster connection socket timeout in milliseconds
The the maximum amount of time, in milliseconds, to wait for a connection pool resource to become available
The maximum number of connections to allow to the Redis server.
The maximum number of idle connections to keep in the pool to the Redis server
The default key prefix is lucee-cache
. This will automatically prefix EVERY single cache item that goes into Redis. This will allow you to avoid collisions if you decide to register many Lucee caches or just to distinguish what comes from which cache connection.
By default all cache keys are transformed to lowercase to avoid any casing issues. However, if you want case sensitivity, then turn this option on.
This is a Lucee feature where you can set the cache connection to be the default for all cache operations in Lucee (cacheGet(), cachePut(), etc). This can be one of the following or none at all.
The RedisClusterCache
is used for connecting to a cluster of Redis instances. This can be using Sentinel, or vanilla clustering or Redis Enterprise or Redis AWS/DigitalOcean. Let's check out the different options:
Check the Storage
box if you want to be able to use this cache for session or client storage distribution.
Enter a comma-delimited list of all the IPs or hosts in the cluster. Not all are needed, but you should at least enter some to have redundancy.
The port of the Redis cluster.
Whether SSL transport is enabled
The Redis cluster username - only used when enabling user-level access.
The Redis cluster password
The time in milliseconds to wait for a connection or throw an exception.
The timeout for a read of data from the cluster - defaults to the connection timeout
The cluster connection socket timeout in milliseconds
The the maximum amount of time, in milliseconds, to wait for a connection pool resource to become available
The maximum number of connections to the cluster allowed per pool - defaults to 50
The max idle time, in milliseconds, for a connection to remain in the pool.
The maximum number of concurrently idle connections to retain in the pool
The maximum number of connection attempts to make to the cluster.
The default key prefix is lucee-cache
. This will automatically prefix EVERY single cache item that goes into Redis. This will allow you to avoid collisions if you decide to register many Lucee caches or just to distinguish what comes from which cache connection.
By default all cache keys are transformed to lowercase to avoid any casing issues. However, if you want case sensitivity, then turn this option on.
This is a Lucee feature where you can set the cache connection to be the default for all cache operations in Lucee (cacheGet(), cachePut(), etc). This can be one of the following or none at all.
You can also add cache connections via your Application.cfc
and avoid using the admin. Just open your Application.cfc
and create a section under the pseudo-constructor (before the first function)
Please refer to the previous section to find out about what the custom options mean.
You can also leverage a cfconfig.json
file to store the cache configurations and automatically load them into your CFML server via CommandBox.
Please refer to the previous section to find out about what the custom options mean.
\