apache / apache/dubbo

"结果缓存"中无法设置过期时间

Open
#7,166 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

### Environment
Dubbo version: 2.7.8
Operating System version: MacOS
Java version: 1.8

### information
dubbo 2.7.8 结果缓存中Cache过期时间无法设置
官方文档:
https://dubbo.apache.org/zh/docs/v2.7/user/examples/result-cache/

JCache.java源码使用了cache.write.expire URL参数,但是这个参数在哪里能设置?
ExpiringCache.java使用了cache.seconds URL参数同样有这个问题
按照源码注释根本没办法启动
``
报错:
`Attribute 'cache.seconds' is not allowed to appear in element 'dubbo:service'.`

### detail
https://github.com/apache/dubbo/blob/2d9583adf26a2d8bd6fb646243a9fe80a77e65d5/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringCache.java#L48
https://github.com/apache/dubbo/blob/2d9583adf26a2d8bd6fb646243a9fe80a77e65d5/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/jcache/JCache.java#L63

![image](https://user-images.githubusercontent.com/16626084/106586147-10170f80-6583-11eb-8dbc-7c27882c8f95.png)
![image](https://user-images.githubusercontent.com/16626084/106586263-3177fb80-6583-11eb-8047-54851e533ff7.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.