cachePubKey method
Implementation
@visibleForTesting
void cachePubKey(String atSign, String enrollmentId, String pubKey) {
if (publicKeyCacheSettings == null) return;
final now = DateTime.now();
pubKeyCache.removeWhere((_, value) => !value.$2.isAfter(now));
pubKeyCache[_cacheKey(atSign, enrollmentId)] = (pubKey, _expiry);
}