Skip to content

When using method level cache, no matter what i config, it's always LruCache. #1362

@zhaojigang

Description

@zhaojigang

consumer配置:
<dubbo:reference id="demoService" check="false" interface="com.alibaba.dubbo.demo.DemoService">
<dubbo:method name="sayHello" timeout="60000" cache="threadlocal"/>
</dubbo:reference>

在执行的过程中,我们发现其实并不会创建ThreadlocalCache,而是用的LruCache,原因是在
image
可以看到,当将cache配置在方法上而不是服务上的时候,传入的url只有"method.cache"参数而没有"cache"参数,但是CacheFactory$Adaptive这个类并没有作区分。

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugBugs to being fixed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions