jaredwray / flat-cache

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

Feature Request: cache.all method #15

Closed OzairP closed 7 years ago

OzairP commented 7 years ago

I think it would be nice to fetch the whole cache object.

const fcache = require('flat-cache')

const birthdays = fcache.load('birthdays')

birthdays.set('Alice', '01/01/98')
birthdays.set('Bob', '02/02/97')

birthdays.all() // returns { 'Alice': '01/01/98', 'Bob': '02/02/97' }
royriojas commented 7 years ago

Hi @OzairP,

I don't think of a reason to no add this one, I will try to find some time to add a method to return the cache object, but if you're interested into adding it, PRs are welcome!

Kind regards

OzairP commented 7 years ago

Awesome, can you push the newest changes to NPM whenever possible? Thanks!

royriojas commented 7 years ago

Thanks @OzairP. Published v1.3.0