Call Result Cache

Speed up access by caching results

Feature description

cache type

  • lru deletes redundant caches based on the least recently used principle, keeping the hottest data cached.
  • threadlocal The current thread cache, such as a page rendering, uses many portals, and each portal needs to check user information. Through thread caching, this redundant access can be reduced.
  • jcache integrates with JSR107 to bridge various cache implementations.

Cache Type Extensible Cache Extensions

About sample code

scenes to be used

The result cache is used to speed up access to popular data. Dubbo provides a declarative cache to reduce the workload of users adding cache.

How to use

<dubbo:reference interface="com.foo.BarService" cache="lru" />

or:

<dubbo:reference interface="com.foo.BarService">
    <dubbo:method name="findBar" cache="lru" />
</dubbo:reference>

Last modified January 2, 2023: Enhance en docs (#1798) (95a9f4f6c1c)