You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a problem all the way up in Nuxt where i wanted to use defineCachedFunction where I wanted to use cache with raw memory, and while working with large payloads I've hit the issue with unstorage implementation of validation leading in the end to parsing and stringification with JSON.parse/stringify. There are getItemRaw and setItemRaw implementations which i've used and reimplemented the above mentioned cache handler but I would like to generally write a "rawMemory" driver that I can just plug in and override the JSON validation layers.
Because of working with large payloads I have a need for speed (pun) and raw JSON.stringify doesn't do the job. There are other tools like precomiplation json stringifiers like fast-json etc. I am unable to leverage those libraries and need to write unstorage implementation from scratch.
I would offer a very simple PR adding some options to the drivers but unfortunately I don't think i'll get it right typescript wise.
I love the whole stack and appreciate the hard work.
Thank you
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
I'm also in the same position where I'm getting a "[nitro] [cache] Cache write error. RangeError: Invalid string length" due to trying to save very large data in the defineCachedFunction
Describe the feature
I have 2 issues which are basically the same:
I've got a problem all the way up in Nuxt where i wanted to use defineCachedFunction where I wanted to use cache with raw memory, and while working with large payloads I've hit the issue with unstorage implementation of validation leading in the end to parsing and stringification with JSON.parse/stringify. There are getItemRaw and setItemRaw implementations which i've used and reimplemented the above mentioned cache handler but I would like to generally write a "rawMemory" driver that I can just plug in and override the JSON validation layers.
Because of working with large payloads I have a need for speed (pun) and raw JSON.stringify doesn't do the job. There are other tools like precomiplation json stringifiers like fast-json etc. I am unable to leverage those libraries and need to write unstorage implementation from scratch.
I would offer a very simple PR adding some options to the drivers but unfortunately I don't think i'll get it right typescript wise.
I love the whole stack and appreciate the hard work.
Thank you
Additional information
The text was updated successfully, but these errors were encountered: