Class CacheInterceptor

java.lang.Object
dev.voidframework.cache.module.CacheInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
Direct Known Subclasses:
CacheInterceptorRemove, CacheInterceptorResult

public abstract class CacheInterceptor extends Object implements org.aopalliance.intercept.MethodInterceptor
Intercepts method calls to apply the desired cache behavior.
  • Field Details

    • cacheEngine

      protected CacheEngine cacheEngine
      Cache engine to use.
  • Constructor Details

    • CacheInterceptor

      protected CacheInterceptor()
      Build a new instance.
  • Method Details

    • setCacheEngine

      @Inject public void setCacheEngine(CacheEngine cacheEngine)
      Sets the cache engine to use.
      Parameters:
      cacheEngine - The cache engine
    • resolveCacheKey

      protected String resolveCacheKey(org.aopalliance.intercept.MethodInvocation methodInvocation, String keyPattern)
      Resolves the cache key.
      Parameters:
      methodInvocation - The current method invocation
      keyPattern - The key pattern
      Returns:
      The resolved cache key