CacheBox: Enterprise Caching
2.x
2.x
  • Introduction
  • What's New With 2.1.0
  • What's New With 2.0.0
  • About This Book
  • Author
  • Overview
    • CacheBox RefCard
    • Useful Resources
    • Features at a Glance
    • System Requirements
  • Installing CacheBox
    • Installation
  • 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
  • Creating CacheBox
    • Common CacheFactory Methods
    • Cache Cleanup/Reaping
  • CacheBox Configuration
    • CacheBox DSL
      • LogBoxConfig
      • Scope Registration
      • Default Cache
      • Caches
      • Listeners
    • CacheBox Config Object
    • ColdBox Configuration
  • Cache Providers
    • Couchbase Providers
    • CF Providers
    • Railo Providers
    • Mock Provider
    • CacheBox Provider
  • CacheBox Object Stores
    • ConcurrentStore
    • ConcurrentSoftReferenceStore
    • DiskStore
    • JDBCStore
    • BlackholeStore
  • 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. CacheBox Object Stores

ConcurrentSoftReferenceStore

PreviousConcurrentStoreNextDiskStore

Last updated 7 years ago

Was this helpful?

The ConcurrentSoftReferenceStore uses a combination of concurrency maps and java soft references. In our introductory sections we introduced java soft references and how it allows us to create placeholders in memory for objects and when the JVM needs memory it has permission to collect these placeholders and thus release memory. This is truly a great combination to have and ColdBox leverages this for its template, event and view fragment caching.

Just remember that when you use this object storage, the time spans are never guaranteed as the JVM has permission to cleanup objects when it sees fit. To get much better performance on the JVM memory heap space and a more active memory, we recommend using this object storage. Research has also indicated that a combination of memory sensitive structures in combination with limits in a cache, can increase performance and optimize its usage. So please make sure limits are set in the cache.

Properties

  • None

You can also find some great research out there about concurrency maps and soft references:

http://www.ibm.com/developerworks/java/library/j-jtp07233.html
http://www.ibm.com/developerworks/java/library/j-jtp01246.html