FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

cbRedis

v1.0.0+17 Modules

CBRedis

A cache provider and Redis-aware module for Cachebox and the Coldbox framework

LICENSE

Apache License, Version 2.0.

Configuration

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
		}
}
CHANGELOG ========= ## 1.0.0 * Initial Module Release

$ box install cbredis

     
  • {{ getFullDate("2016-10-02T08:27:02Z") }}
  • {{ getFullDate("2016-10-02T12:00:06Z") }}
  • 2,364
  • 3,414