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

Was this helpful?

Edit on GitHub
Export as PDF
  1. Getting Started
  2. Creating CacheBox

Cache Cleanup/Reaping

If you are using CacheBox within a ColdBox application, ColdBox is in charge of emitting reaping or cleanup requests to the CacheBox factory. However, if you are using the standalone version of the cache, then you will need to emit this command yourself in the desired execution point. We would suggest to do this on every request. This does not mean that the request executes every time, it means that the trigger is made and if the reaping time has been elapsed, then the caches clean themselves (CacheBox Providers Only!):

cachebox.reapAll();

That's it! Just call on the reapAll() method and this will make sure that your caches clean themselves according to the reaping frequency selected in your configuration file.

Info: Reaping frequency and cleanup only applies to the CacheBox Provider.

PreviousCommon CacheFactory MethodsNextCacheBox Configuration

Last updated 1 year ago

Was this helpful?