1
1
<snippet >
2
2
<content ><![CDATA[
3
- /**
4
- * CacheBox Configuration File
5
- */
6
- component{
7
-
3
+ component {
4
+
5
+ /**
6
+ * Configure CacheBox for ColdBox Application Operation
7
+ */
8
8
function configure(){
9
-
10
- // The CacheBox configuration structure DSL
9
+ /**
10
+ * --------------------------------------------------------------------------
11
+ * CacheBox Configuration (https://cachebox.ortusbooks.com)
12
+ * --------------------------------------------------------------------------
13
+ */
11
14
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
29
34
},
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
46
62
}
47
- }
48
- }
63
+ }
64
+ }
49
65
};
50
- }
51
-
52
-
66
+ }
67
+
53
68
}
54
69
]]> </content >
55
70
<tabTrigger >cachebox-config</tabTrigger >
56
71
<scope >source,text</scope >
57
72
<description >CacheBox Configuration File (CaceBox.cfc)</description >
58
- </snippet >
73
+ </snippet >
0 commit comments