2.3. 添加缓存条目
在数据容器中创建 key:value 对条目。
先决条件
创建可存储数据的数据仓库缓存。
流程
- 创建与 Data Grid 的 CLI 连接。
在缓存中添加条目,如下所示:
在
put命令中使用--cache=:put --cache=mycache hello world在缓存上下文中使用
put命令:[//containers/default/caches/mycache]> put hello world
使用
get命令验证条目。[//containers/default/caches/mycache]> get hello world