This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Implement $cacheFactory.Cache#has method #8692
Closed
Description
When checking in #8214 I was honestly surprised we don't expose a way to check if a key is in the cache.
It would be helpful to have a simple implementation, like has: function(key) { return key in data; }
or something.
@IgorMinar this is a public API change so I didn't just write a patch, but what do you think? It's pretty trivial and better than testing if the value of a key is undefined