Refactor clear method of CacheMongoose class
ozanbaskan opened this issue · 4 comments
ozanbaskan commented
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)
ilovepixelart commented
Good Idea, but why you need an empty string key?
ilovepixelart commented
PR: #67
ozanbaskan commented
Good Idea, but why you need an empty string key?
I may need it for keeping a special value.
ilovepixelart commented