jaredwray / flat-cache

A stupidly simple key/value storage using files to persist the data
MIT License
165 stars 30 forks source link

save(true) not work when getKey is empty #39

Closed amirrezasalimi closed 1 year ago

amirrezasalimi commented 5 years ago

hi see my codes when cache is empty getKey return undefined and i cant use push over that to save with prune image

but this worked when add this code to cache.js image https://github.com/royriojas/flat-cache/blob/9e95cdca746ccc5c066d277f1edde9c9b9f95348/cache.js#L80

please fix thanks