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
The constructor example from the docs is a bit strange (for me) in that a random json file would be created every time my program would run (store: new KeyvFile({filename:./cache/default-rnd-${Math.random().toString(36).slice(2).json})). This would not be useful as subsequent runs of my program would not use the previously cached values.
Of course, I can use a static name for my cache (store: new KeyvFile({filename:./cache/default.json})), and that works fine over time. However, keyv-file stores all the keys and their values in the same json file. This would be a problem as the cache grows, and it would also create problems when there are concurrent reads/writes.
Is there a way to store each key-value pair in a separate file, hopefully named using a unique, random cacheKey? If not, I might have to adapt or rewrite a new file adapter.
The text was updated successfully, but these errors were encountered:
The constructor example from the docs is a bit strange (for me) in that a random
json
file would be created every time my program would run (store: new KeyvFile({filename:
./cache/default-rnd-${Math.random().toString(36).slice(2).json})
). This would not be useful as subsequent runs of my program would not use the previously cached values.Of course, I can use a static name for my cache (
store: new KeyvFile({filename:
./cache/default.json})
), and that works fine over time. However,keyv-file
stores all the keys and their values in the samejson
file. This would be a problem as the cache grows, and it would also create problems when there are concurrent reads/writes.Is there a way to store each key-value pair in a separate file, hopefully named using a unique, random cacheKey? If not, I might have to adapt or rewrite a new file adapter.
The text was updated successfully, but these errors were encountered: