cachePubKey method
Implementation
@visibleForTesting
void cachePubKey(String atSign, String enrollmentId, String pubKey) {
if (publicKeyCacheSettings == null) return;
// Create a timer to auto purge the cache
final timer = Timer(publicKeyCacheSettings!.cacheExpiry, () {
pubKeyCache.remove(_cacheKey(atSign, enrollmentId));
});
pubKeyCache[_cacheKey(atSign, enrollmentId)] = (pubKey, timer);
}