我可以使用Elasticache memcached存储该值在键值对中具有JSON对象的事件
我正在尝试将事件推入缓存。事件包含一个键值对。关键是字符串,“值”是一个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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将JSON对象序列化为文本字符串,然后再将其存储使用memcached
You would need to serialize the JSON object to a text string before storing it with Memcached