CacheBox: Enterprise Caching
7.x
7.x
  • Introduction
    • Contributing Guide
    • Release History
      • What's New With 7.2.0
      • What's New With 7.1.0
      • What's New With 7.0.0
    • Upgrading to CacheBox 7
    • About This Book
      • Author
  • Getting Started
    • Overview
    • Installing CacheBox
    • Creating CacheBox
      • Common CacheFactory Methods
      • Cache Cleanup/Reaping
  • Configuration
    • CacheBox Configuration
      • CacheBox DSL
        • Default Cache
      • CacheBox Config Object
      • ColdBox Configuration
  • Usage
    • Cache Providers
      • CF Providers
      • Lucee Providers
      • Mock Provider
      • CacheBox Provider
      • Couchbase Providers
    • CacheBox Object Stores
      • ConcurrentStore
      • ConcurrentSoftReferenceStore
      • DiskStore
      • JDBCStore
      • BlackholeStore
  • Advanced Usage
    • CacheBox Eviction Policies
      • Using Your Own Policy
    • CacheBox Event Model
      • CacheBox Events
      • Provider Events
      • Cache Listeners
    • Cache Reporting
      • Creating Your Own Skins
        • Skin Templates
        • ReportHandler
          • Action Commands
  • For The Geeks
    • Caching Concepts
      • Caching Considerations
      • Cache Loading
      • Definitions
      • Java Soft References
    • Cache Topologies
      • Single Instance/In-Process
      • Single Instance/Out-Process
      • Replicated
      • Distributed
    • CacheBox Architecture
      • CacheFactory
      • CacheBoxConfig
      • EventManager
      • ColdBox
      • LogBox
      • ICacheProvider
      • ICacheStats
      • IObjectStore
      • IEvictionPolicy
      • AbstractEvictionPolicy
      • IColdboxApplicationCache
Powered by GitBook
On this page
  • CacheBoxProvider-CacheBoxColdBoxProvider Events
  • CFProvider-CFColdboxProvider Events

Was this helpful?

Edit on GitHub
Export as PDF
  1. Advanced Usage
  2. CacheBox Event Model

Provider Events

Each cache provider has the potential of announcing life cycle events as it implements it. If you are a cache provider author, then you can use the aggregated EventManager to register, process and announce events a-la-carte. So let's investigate each provider's life cycle events:

CacheBoxProvider-CacheBoxColdBoxProvider Events

Event

Data

Description

afterCacheElementUpdated

cache: the cache provider cacheNewObject: the new object to cache cacheOldObject: the object replaced

Called via a set() operation when there is already the same key in the cache. Called before the replacement occurs

afterCacheElementInsert

cache: the cache provider cacheObject: the new object to cache cacheObjectKey: the key used to store the object cacheObjectTimeout: the timeout used cacheObjectLastAccessTimeout:the last access timeout used

Called after a new cache element has been inserted into the cache

afterCacheElementRemoved

cache: the cache provdier cacheObjectKey: the key of the removed object

Called after a cache element has been removed from the cache

afterCacheClearAll

cache: the cache provider

Called after a clearAll() has been issued on the cache

afterCacheElementExpired

cache: the cache provider cacheObjectKey: the key of the expired object

Called after a cache element has been expired from the cache

CFProvider-CFColdboxProvider Events

Event

Data

Description

afterCacheElementInsert

cache: the cache provider cacheObject: the new object to cache cacheObjectKey: the key used to store the object cacheObjectTimeout: the timeout used cacheObjectLastAccessTimeout: the last access timeout used

Called after a new cache element has been inserted into the cache

afterCacheElementRemoved

cache: the cache provider cacheObjectKey: the key of the removed object

Called after a cache element has been removed from the cache

afterCacheClearAll

cache: the cache provider

Called after a clearAll() has been issued on the cache

PreviousCacheBox EventsNextCache Listeners

Last updated 2 years ago

Was this helpful?