类 CacheFilter

  • 所有已实现的接口:
    Filter

    @Activate(group={"consumer","provider"},
              value="cache")
    public class CacheFilter
    extends Object
    implements Filter
    CacheFilter is a core component of dubbo.Enabling cache key of service,method,consumer or provider dubbo will cache method return value. Along with cache key we need to configure cache type. Dubbo default implemented cache types are
  • lru
  • threadlocal
  • jcache
  • expiring
  •    e.g. 1)<dubbo:service cache="lru" />
            2)<dubbo:service /> <dubbo:method name="method2" cache="threadlocal" /> <dubbo:service/>
            3)<dubbo:provider cache="expiring" />
            4)<dubbo:consumer cache="jcache" />
    
    If cache type is defined in method level then method level type will get precedence. According to above provided
    example, if service has two method, method1 and method2, method2 will have cache type as threadlocal where others will
    be backed by lru
    
另请参阅:
Filter, LruCacheFactory, LruCache, JCacheFactory, JCache, ThreadLocalCacheFactory, ThreadLocalCache, ExpiringCacheFactory, ExpiringCache