CacheBox: Enterprise Caching
5.x
5.x
  • Introduction
  • Intro
    • Introduction
      • What's New With 5.4.0
      • What's New With 5.0.0
      • About This Book
      • Author
  • Getting Started
    • Overview
      • CacheBox RefCard
      • Useful Resources
      • Features at a Glance
    • Installing CacheBox
    • Creating CacheBox
      • Common CacheFactory Methods
      • Cache Cleanup/Reaping
  • 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
  • Configuration
    • CacheBox Configuration
      • CacheBox DSL
        • LogBoxConfig
        • Scope Registration
        • Default Cache
        • Caches
        • Listeners
      • 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
Powered by GitBook
On this page

Was this helpful?

Edit on Git
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 MethodsNextCaching Concepts

Last updated 7 years ago

Was this helpful?