Class JCSCacheService

java.lang.Object
com.easydesk.cache.impl.JCSCacheService
All Implemented Interfaces:
GlobalCacheService

@Component public class JCSCacheService extends Object implements GlobalCacheService
Spring-managed replacement for Apache easydesk's Avalon-based JCSCacheService. Behaviorally equivalent to the original -- same GlobalCacheService contract, same underlying Apache Commons JCS3 cache engine -- but wired and lifecycle-managed by Spring instead of the Avalon container.

Changes from the original:

  • Configurable.configure(Configuration) → @Value property injection (easydesk.cache.* properties).
  • Initializable.initialize() → PostConstruct.
  • Disposable.dispose() → PreDestroy.
  • AbstractLogEnabled.getLogger() → a plain SLF4J logger.
  • The hand-rolled daemon Thread/Runnable housekeeping loop → Scheduled. Spring's TaskScheduler takes care of the thread; this class only supplies the work to run. The consuming application must add @EnableScheduling to one of its @Configuration classes for this to fire.
  • ThreadSafe (an Avalon marker interface) is dropped; the thread-safety guarantee is now simply documented here: this bean is stateless apart from the JCS cache handle itself, which is thread-safe by design, so the default Spring singleton scope is safe.