Open roonie007 opened 5 years ago
I think its better that it returns the Key instead of the Value, because with the key, you can always do this to retrieve the value in a chaining promise
personCache.set('john', 'john, paul, george, ringo') .then(personCache.get) .then(console.log) // john, paul, george, ringo
but you have no way to get the Key from the chained Promise.
I opened PR #16
I think its better that it returns the Key instead of the Value, because with the key, you can always do this to retrieve the value in a chaining promise
but you have no way to get the Key from the chained Promise.