ilovepixelart/ts-cache-mongoose

Refactor clear method of CacheMongoose class

ozanbaskan opened this issue · 4 comments

Is your feature request related to a problem? Please describe.
Instead of checking whether the key is falsy or not we can check if it is undefined, so I can remove a key which is an empty string.

Describe the solution you'd like
I want to be able to pass an empty string and clear that key.

Describe alternatives you've considered
if (customKey != null) or if (customKey !== undefined) instead of if (customKey)

Good Idea, but why you need an empty string key?

Good Idea, but why you need an empty string key?

I may need it for keeping a special value.