Advertisement
murp

CacheBox Config File

Sep 3rd, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. component
  2. {
  3.  
  4. /**
  5. * Configure CacheBox, that's it!
  6. */
  7. function configure(){
  8.  
  9. // The CacheBox configuration structure DSL
  10. cacheBox = {
  11. // LogBox Configuration file
  12. //logBoxConfig = application.wirebox.getLogBox(),
  13.  
  14. // Scope registration, automatically register the cachebox factory instance on any CF scope
  15. // By default it registeres itself on server scope
  16. scopeRegistration = {
  17. enabled = true,
  18. scope = "application", // server, cluster, session
  19. key = "cacheBox"
  20. },
  21.  
  22. // The defaultCache has an implicit name "default" which is a reserved cache name
  23. // It also has a default provider of cachebox which cannot be changed.
  24. // All timeouts are in minutes
  25. defaultCache = {
  26. objectDefaultTimeout = 60,
  27. objectDefaultLastAccessTimeout = 30,
  28. useLastAccessTimeouts = true,
  29. reapFrequency = 2,
  30. freeMemoryPercentageThreshold = 0,
  31. evictionPolicy = "LRU",
  32. evictCount = 1,
  33. maxObjects = 200,
  34. objectStore = "ConcurrentSoftReferenceStore"
  35. },
  36.  
  37. // Register all the custom named caches you like here
  38. caches = {
  39. sampleCache1 = {
  40. provider="facade.wirebox.system.cache.providers.CacheBoxProvider",
  41. properties = {
  42. objectDefaultTimeout="20",
  43. useLastAccessTimeouts="false",
  44. reapFrequency="1",
  45. evictionPolicy="LFU",
  46. evictCount="1",
  47. maxObjects="100",
  48. objectStore="ConcurrentSoftReferenceStore"
  49. }
  50. },
  51. sampleCache2 = {
  52. provider = "facade.wirebox.system.cache.providers.CacheBoxProvider",
  53. properties = {
  54. maxObjects = 100,
  55. evictionPolicy="FIFO"
  56. }
  57. }
  58. },
  59.  
  60. // Register all event listeners here, they are created in the specified order
  61. listeners = [
  62. // { class="", name="", properties={} }
  63. ]
  64.  
  65. };
  66. }
  67.  
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement