11<snippet >
22<content ><![CDATA[
3- /**
4- * CacheBox Configuration File
5- */
6- component{
7-
3+ component {
4+
5+ /**
6+ * Configure CacheBox for ColdBox Application Operation
7+ */
88 function configure(){
9-
10- // The CacheBox configuration structure DSL
9+ /**
10+ * --------------------------------------------------------------------------
11+ * CacheBox Configuration (https://cachebox.ortusbooks.com)
12+ * --------------------------------------------------------------------------
13+ */
1114 cacheBox = {
12- // LogBox config already in coldbox app, not needed
13- // logBoxConfig = "coldbox.system.web.config.LogBox",
14-
15- // The defaultCache has an implicit name "default" which is a reserved cache name
16- // It also has a default provider of cachebox which cannot be changed.
17- // All timeouts are in minutes
18- defaultCache = {
19- objectDefaultTimeout = 120, //two hours default
20- objectDefaultLastAccessTimeout = 30, //30 minutes idle time
21- useLastAccessTimeouts = true,
22- reapFrequency = 2,
23- freeMemoryPercentageThreshold = 0,
24- evictionPolicy = "LRU",
25- evictCount = 1,
26- maxObjects = 300,
27- objectStore = "ConcurrentStore", //guaranteed objects
28- coldboxEnabled = true
15+ /**
16+ * --------------------------------------------------------------------------
17+ * Default Cache Configuration
18+ * --------------------------------------------------------------------------
19+ * The defaultCache has an implicit name "default" which is a reserved cache name
20+ * It also has a default provider of cachebox which cannot be changed.
21+ * All timeouts are in minutes
22+ */
23+ defaultCache : {
24+ objectDefaultTimeout : 120, // two hours default
25+ objectDefaultLastAccessTimeout : 30, // 30 minutes idle time
26+ useLastAccessTimeouts : true,
27+ reapFrequency : 5,
28+ freeMemoryPercentageThreshold : 0,
29+ evictionPolicy : "LRU",
30+ evictCount : 1,
31+ maxObjects : 300,
32+ objectStore : "ConcurrentStore", // guaranteed objects
33+ coldboxEnabled : true
2934 },
30-
31- // Register all the custom named caches you like here
32- caches = {
33- // Named cache for all coldbox event and view template caching
34- template = {
35- provider = "coldbox.system.cache.providers.CacheBoxColdBoxProvider",
36- properties = {
37- objectDefaultTimeout = 120,
38- objectDefaultLastAccessTimeout = 30,
39- useLastAccessTimeouts = true,
40- freeMemoryPercentageThreshold = 0,
41- reapFrequency = 2,
42- evictionPolicy = "LRU",
43- evictCount = 2,
44- maxObjects = 300,
45- objectStore = "ConcurrentSoftReferenceStore" //memory sensitive
35+ /**
36+ * --------------------------------------------------------------------------
37+ * Custom Cache Regions
38+ * --------------------------------------------------------------------------
39+ * You can use this section to register different cache regions and map them
40+ * to different cache providers
41+ */
42+ caches : {
43+ /**
44+ * --------------------------------------------------------------------------
45+ * ColdBox Template Cache
46+ * --------------------------------------------------------------------------
47+ * The ColdBox Template cache region is used for event/view caching and
48+ * other internal facilities that might require a more elastic cache.
49+ */
50+ template : {
51+ provider : "coldbox.system.cache.providers.CacheBoxColdBoxProvider",
52+ properties : {
53+ objectDefaultTimeout : 120,
54+ objectDefaultLastAccessTimeout : 30,
55+ useLastAccessTimeouts : true,
56+ freeMemoryPercentageThreshold : 0,
57+ reapFrequency : 5,
58+ evictionPolicy : "LRU",
59+ evictCount : 2,
60+ maxObjects : 300,
61+ objectStore : "ConcurrentSoftReferenceStore" // memory sensitive
4662 }
47- }
48- }
63+ }
64+ }
4965 };
50- }
51-
52-
66+ }
67+
5368}
5469]]> </content >
5570 <tabTrigger >cachebox-config</tabTrigger >
5671 <scope >source,text</scope >
5772 <description >CacheBox Configuration File (CaceBox.cfc)</description >
58- </snippet >
73+ </snippet >
0 commit comments