Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

CacheBox.cfc 2.5 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
  1. component {
  2. /**
  3. * Configure CacheBox for ColdBox Application Operation
  4. */
  5. function configure(){
  6. /**
  7. * --------------------------------------------------------------------------
  8. * CacheBox Configuration (https://cachebox.ortusbooks.com)
  9. * --------------------------------------------------------------------------
  10. */
  11. cacheBox = {
  12. /**
  13. * --------------------------------------------------------------------------
  14. * Default Cache Configuration
  15. * --------------------------------------------------------------------------
  16. * The defaultCache has an implicit name "default" which is a reserved cache name
  17. * It also has a default provider of cachebox which cannot be changed.
  18. * All timeouts are in minutes
  19. */
  20. defaultCache : {
  21. objectDefaultTimeout : 120, // two hours default
  22. objectDefaultLastAccessTimeout : 30, // 30 minutes idle time
  23. useLastAccessTimeouts : true,
  24. reapFrequency : 5,
  25. freeMemoryPercentageThreshold : 0,
  26. evictionPolicy : "LRU",
  27. evictCount : 1,
  28. maxObjects : 300,
  29. objectStore : "ConcurrentStore", // guaranteed objects
  30. coldboxEnabled : true
  31. },
  32. /**
  33. * --------------------------------------------------------------------------
  34. * Custom Cache Regions
  35. * --------------------------------------------------------------------------
  36. * You can use this section to register different cache regions and map them
  37. * to different cache providers
  38. */
  39. caches : {
  40. /**
  41. * --------------------------------------------------------------------------
  42. * ColdBox Template Cache
  43. * --------------------------------------------------------------------------
  44. * The ColdBox Template cache region is used for event/view caching and
  45. * other internal facilities that might require a more elastic cache.
  46. */
  47. template : {
  48. provider : "coldbox.system.cache.providers.CacheBoxColdBoxProvider",
  49. properties : {
  50. objectDefaultTimeout : 120,
  51. objectDefaultLastAccessTimeout : 30,
  52. useLastAccessTimeouts : true,
  53. freeMemoryPercentageThreshold : 0,
  54. reapFrequency : 5,
  55. evictionPolicy : "LRU",
  56. evictCount : 2,
  57. maxObjects : 300,
  58. objectStore : "ConcurrentSoftReferenceStore" // memory sensitive
  59. }
  60. }
  61. }
  62. };
  63. }
  64. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...