BoxLang 🚀 A New JVM Dynamic Language Learn More...
Apache License, Version 2.0.
The module is configured like any other CacheBox provider cache. An example configuration would be:
cacheBox.caches[ "myRedisCache" ] = {
provider = "cbRedis.models.RedisColdboxProvider",
properties = {
//The maximium number of connections in the Redis pool
maxConnections = 10
//The cache object timeout - set in the distributed cache settings
,objectDefaultTimeout = 7000
//The queue wait timeout, in ms, allowed for the pool to receive a new connection - when this is reached, aggressive pool management begins
,opQueueMaxBlockTime = 5000
// The allowable operation timeout for
,opTimeout = 5000
// The timeout in milliseconds to begin exception handling
,timeoutExceptionThreshold = 5000
// A single host (string) or an array of hosts
,server = [ "192.123.456.7:6379" , "192.123.456.8:6379" ]
// If a password is provided in the runtime properties it will be automatically used for the Redis connection
,password = "MyS3cureP455"
// Whether to maintain case for the cache keys ( e.g. - i18n keys might need case sensitivity )
,caseSensitiveKeys : variables.settings.distributedCaches[ cacheKey ].caseSensitiveKeys
// Whether to update the stats for the individual cache items - Redis will maintain the timeout so, unless the metadata of the keys is being introspected, set it to false
,updateStats : false
// Whether to log debug statements and timers to stdout
,debug = false
// the zero-based index of the cache/db - this ensures cache flushing only impacts one cache recordset
,dbIndex = iCache
}
}
$
box install cbredis