jaredwray / flat-cache

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

FIX: Do not crash if cache file is invalid JSON. #13

Closed royriojas closed 7 years ago

royriojas commented 7 years ago

Fixes #12

Not sure under which situations a cache file might exist that does not contain a valid JSON structure, but just in case to cover the possibility of this happening a try catch block has been added

If the cache is somehow not valid the cache will be discarded an a a new cache will be stored instead