Closed alko89 closed 2 months ago
I just saw an error about a Map on another cache-manager plugin today and if default serialization is JSON.stringify, there's additional work needed to serialize transparently: https://github.com/rolandstarke/node-cache-manager-fs-hash/issues/14#issue-1635979064
@zph seems like the library already uses some form of replacer, because the Map is being serialized as "map": {"_constructor-name_":"Map"}
, by default it's just an empty object "map": {}
.
I did end up using the method mentioned in SO and use redis client without cache module.
@alko89 have you tried using the redis
driver instead of ioredis
?
hmm no, I haven't tried using different drivers, always use ioredis
@alko89 - please try it on redis as we added more around how to support things like this.
Describe the bug
When trying to store an object that contains a Map, it's being stored as
{"_constructor-name_":"Map"}
instead of the actual value.How To Reproduce (best to provide workable code or tests!)