GitHub user a2501521908 created a discussion: dubbo缓存过期时间
### Pre-check
- [X] I am sure that all the content I provide is in English.
### Apache Dubbo Component
Java SDK (apache/dubbo)
### Details
I am using server-side result caching in Dubbo with the following annotation:
```java
@DubboService(methods = {
@Method(name = "getBusinessHost", cache = "expiring")
})
```
I followed the official documentation about result cache configuration:
https://cn.dubbo.apache.org/zh-cn/overview/mannual/java-sdk/tasks/framework/more/result-cache/
However, I have two questions regarding cache expiration:
How can the cache expiration time (TTL) be configured for the expiring cache?
I could not find a clear example showing how to set the expiration duration.
Is it possible to configure different cache expiration times at the method
level?
For example, setting different TTLs for different methods within the same
service.
Any clarification or recommended best practices would be greatly appreciated.
Thank you.
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://www.apache.org/foundation/policies/conduct)
GitHub link: https://github.com/apache/dubbo/discussions/16002
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]