3.3. 缓存别名
为缓存添加别名以使用不同名称访问它们。
提示
缓存配置的 alias 属性在运行时是 updatable。将别名重新分配给不同的缓存,以快速切换缓存内容。
XML
<distributed-cache name="acache" aliases="0 anothername"/>
<distributed-cache name="acache" aliases="0 anothername"/>
JSON
{ "distributed-cache": { "aliases": ["0", "anothername"] } }
{
"distributed-cache": {
"aliases": ["0", "anothername"]
}
}
YAML
distributedCache: aliases: - "0" - "anothername"
distributedCache:
aliases:
- "0"
- "anothername"