gpt4 book ai didi

javascript - 你能安全地将 JavaScript 类实例存储在 Redis 中吗?

转载 作者:可可西里 更新时间:2023-11-01 11:23:33 26 4
gpt4 key购买 nike

<分区>

例如:

let client1 = new Client(); // it can do client1.connect() and other methods
await redis.hset('client1', JSON.stringify(client1));
client1 = await redis.get('client1');
client1 = JSON.parse(client1);
await client1.connect();

如果您曾经取回该值并对其进行 JSON.parse(),它仍然可以正常工作,这是否安全?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com