Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
class : cachebox.system.core.events.EventPoolManager or coldbox.system.web.services.InterceptorService
If you are in standalone mode then CacheBox configures its own internal event manager that is very similar to the ColdBox Interceptor Service. This event manager keeps track of the listeners for each of the interceptions points or events that are broadcasted by CacheBox and its providers.
class : cachebox.system.logging.LogBox
A reference to either a new instance of LogBox, if running in standalone mode, or a running LogBox instance via the running ColdBox application context.
class : cachebox.system.cache.config.CacheBoxConfig
This is the required configuration object the CacheFactory
object needs in order to start itself up. This configuration object can be created and then used to configure all your caches, listeners, scope registrations and logging. We will investigate all the types of configurations available but they all translate down to methods in this configuration object. Ways to configure CacheBox:
Programmatically via method calls
Programmatically via a CacheBox DSL or a CacheBox DSL CFC
class : cachebox.system.cache.util.ICacheStats
This interface is the contract for statistics reporting. This is how CacheBox can produce gorgeous charting and reporting based on the implementation of this class.
class : cachebox.system.cache.CacheFactory
The CacheFactory
object is the most important object as it represents CacheBox. The class path for this object is coldbox.system.cache.CacheFactory
or in standalone mode cachebox.system.cache.CacheFactory
.
This is the aggregator or cache overseer that you will interact with to get caches, shutdown caches, perform global cache operations, and startup your CacheBox instance. If you are using CacheBox within a ColdBox application context, then ColdBox does all the configurations and creations for you. It even links your ColdBox context, LogBox and ColdBox Intercepting service for you.
class : cachebox.system.cache.store.IObjectStore
A CacheBox cache provider uses the concept of an object store in order to, well, store its cached objects. This can be anything as we have created an interface that anybody can implement and create their own object storages. Just be aware that the CacheBox provider's eviction policies use certain methods for reporting and evictions that MUST be implemented.
class : cachebox.system.cache.ICacheProvider
This is the main interface that each caching engine implementation must implement in order for CacheBox to aggregate it and use it. Each implementation can add additional functionality and methods but this is the core contract that each provider must adhere to. CacheBox aggregates 1 or more instances of CacheProviders that implement this interface. You can find all of our CacheBox cache providers in the following location:
class : coldbox.system.web.Controller
A reference to a running ColdBox application context the CacheBox instance is running under. This will be null if running in standalone mode. However, if you are within a ColdBox application, the CacheProvider
and its references can access anything within the running ColdBox application.
class : cachebox.system.cache.IColdboxApplicationCache
This interface extends from the original cache provider interface and adds certain methods that MUST be implemented so the cache can work for ColdBox applications. This includes functionality to do event/view caching, clearing/expiring by certain regular expressions and reporting. So if you want to create your own cache implementation for ColdBox applications, then it must adhere to this contract.
class : cachebox.system.cache.policies.AbstractEvictionPolicy
This is the abstract class that gives the magic to eviction policies under the CacheBox cache provider. It communicates with the internal object stores and asks for specific metadata in specific sorter orders so the policy can execute its algorithm. Our current algorithms are: LRU,LFU, and FIFO. However, you can very easily implement your own.
CacheBox is architected to act as a cache aggregator but also has its own cache implementation based on a hybrid of ColdFusion and Java. Let's investigate first of all the major classes that make up CacheBox.
class : cachebox.system.cache.policies.IEvictionPolicy
This is the contract for creating eviction policies for usage by the CacheBox cache provider.