简体   繁体   English

如何使用 aws-sdk 方法从 elasticache 设置或获取数据

[英]How to set or get data from elasticache using aws-sdk methods

I am trying get data from redis using aws-sdk in node js.我正在尝试在节点 js 中使用 aws-sdk 从 redis 获取数据。 so far I am able to connect with the cache using client-elasticache.到目前为止,我能够使用 client-elasticache 连接缓存。

redisClient = new ElastiCacheClient({region : "REGION"});

Library: @aws-sdk/client-elasticache库: @aws-sdk/client-elasticache

But I am not able to find any direct method to get data from cache using this client for example get() or mget() we have in io-redis.但是我找不到任何直接的方法来使用这个客户端从缓存中获取数据,例如我们在 io-redis 中的get()mget() Is there a way to get data like this using aws-sdk?有没有办法使用 aws-sdk 获取这样的数据?

The AWS SDK ElastiCache client is for managing ElastiCache servers. AWS SDK ElastiCache 客户端用于管理 ElastiCache 服务器。 It is for performing tasks like creating or deleting entire servers or clusters.它用于执行创建或删除整个服务器或集群等任务。

You need to use an actual Redis client library for interacting with the data inside your Redis cluster.您需要使用实际的 Redis 客户端库与 Redis 集群中的数据进行交互。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM