我可以使用Elasticache memcached存储该值在键值对中具有JSON对象的事件

发布于 2025-01-24 20:00:08 字数 131 浏览 0 评论 0原文

我正在尝试将事件推入缓存。事件包含一个键值对。关键是字符串,“值”是一个JSON对象。我可以为此使用memcached(我已经在某个地方阅读了在Memcached中只能使用字符串,但是在这里我将JSON对象用作值)。请帮我。

提前致谢

I'm trying to push the events into the cache. The events contain a key-value pair. The key is a string and "Value" is a JSON object. Can I use memcached for this(I have read somewhere that in memcached we can use only strings, but here I'm using a JSON object as value). Please help me.

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

守不住的情 2025-01-31 20:00:08

您需要将JSON对象序列化为文本字符串,然后再将其存储使用memcached

You would need to serialize the JSON object to a text string before storing it with Memcached

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文