If you would like to use CacheBox for persistence for you objects you will need to mark your CFC with the following annotation(s)
cachebox="[provider]"
- The default provider is called 'default', so this annotation can be empty or a named cache provider
cache
- Cache into the default provider, shorthand annotation, no value needed
This annotation has two sub annotations that you can also leverage for granular control of your CacheBox integration:
cacheTimeout
- The timeout in minutes (optional)
cacheLastAccessTimeout
- The last access or idle timeout in minutes (optional)
Caution When storing objects in volatile scopes like cache, session, request, etc. You must be careful of not injecting them directly into singletons or other volatile objects as you could have memory leaks via a side effect called Scope Widening Injection. We recommend combining them via WireBox Providers to avoid this side effect.