How can I Set the TTL/TTI/Eviction policy/XXX feature?
直接通过缓存提供者。缓存抽象是一种抽象,而不是缓存实现。你使用的解决方案可能支持其他解决方案不支持的各种数据策略和不同拓扑(例如,JDK`ConcurrentHashMap`——将它公开在缓存抽象中是没有意义的,因为不会有支持后备)。此类功能应直接通过后备缓存(在对其进行配置时)或通过其本机 API 进行控制。
Directly through your cache provider. The cache abstraction is an abstraction,
not a cache implementation. The solution you use might support various data
policies and different topologies that other solutions do not support (for example,
the JDK ConcurrentHashMap
— exposing that in the cache abstraction would be useless
because there would no backing support). Such functionality should be controlled
directly through the backing cache (when configuring it) or through its native API.