Created
May 1, 2013 16:47
-
-
Save nolandubeau/5496498 to your computer and use it in GitHub Desktop.
Cachebox settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!----------------------------------------------------------------------- | |
******************************************************************************** | |
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp | |
www.coldbox.org | www.luismajano.com | www.ortussolutions.com | |
******************************************************************************** | |
Author : Luis Majano | |
Description : | |
CacheBox configuration structure | |
-----------------------------------------------------------------------> | |
<cfcomponent output="false"> | |
<cfscript> | |
/** | |
* Configure CacheBox for ColdBox Application Operation | |
*/ | |
function configure(){ | |
// The CacheBox configuration structure DSL | |
cacheBox = { | |
// LogBox config already in coldbox app, not needed | |
// logBoxConfig = "coldbox.system.web.config.LogBox", | |
// The defaultCache has an implicit name "default" which is a reserved cache name | |
// It also has a default provider of cachebox which cannot be changed. | |
// All timeouts are in minutes | |
defaultCache = { | |
objectDefaultTimeout = 120, //two hours default | |
objectDefaultLastAccessTimeout = 30, //30 minutes idle time | |
useLastAccessTimeouts = true, | |
reapFrequency = 2, | |
freeMemoryPercentageThreshold = 0, | |
evictionPolicy = "LRU", | |
evictCount = 1, | |
maxObjects = 300, | |
objectStore = "ConcurrentStore", //guaranteed objects | |
coldboxEnabled = true | |
}, | |
// Register all the custom named caches you like here | |
caches = { | |
// Named cache for all coldbox event and view template caching | |
template = { | |
provider = "coldbox.system.cache.providers.CacheBoxColdBoxProvider", | |
properties = { | |
objectDefaultTimeout = 120, | |
objectDefaultLastAccessTimeout = 30, | |
useLastAccessTimeouts = true, | |
freeMemoryPercentageThreshold = 0, | |
reapFrequency = 2, | |
evictionPolicy = "LRU", | |
evictCount = 2, | |
maxObjects = 300, | |
objectStore = "ConcurrentSoftReferenceStore" //memory sensitive | |
} | |
}, | |
// JDBC Cache | |
database = { | |
provider = "coldbox.system.cache.providers.CacheBoxColdBoxProvider", | |
properties = { | |
objectDefaultTimeout = 120, | |
objectDefaultLastAccessTimeout = 30, | |
useLastAccessTimeouts = true, | |
reapFrequency = 5, | |
evictionPolicy = "LRU", | |
evictCount = 5, | |
maxObjects = 1000, | |
objectStore = "JDBCStore", | |
dsn =application.dsn, | |
table = "cachebox", | |
tableautocreate = "false" | |
} | |
} | |
} | |
}; | |
} | |
</cfscript> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment