jaredwray / flat-cache

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

Add a way to keep non visited keys #7

Closed royriojas closed 8 years ago

royriojas commented 8 years ago

This is related to https://github.com/royriojas/file-entry-cache/issues/2, which in time is also related to https://github.com/eslint/eslint/issues/6780

Basically the default behavior of this module was to prune non visited keys. This was done to prevent non visited keys to stay in the cache. Since the main use case of this module is just to load to memory the cache, do operations in memory and then persist the new changes back to disk at the end of the process. I assumed non visited keys were not relevant anymore so they were removed.

But as described in the issues linked above, there might be scenarios when we want to keep the non visited keys.