in connector/src/main/scala/com/microsoft/kusto/spark/utils/KustoAzureFsSetupCache.scala [17:35]
def updateAndGetPrevStorageAccountAccess(
account: String,
secret: String,
now: Instant): Boolean = {
val maybeSecretCache = storageAccountKeyMap.get(account)
val shouldRefreshCache = maybeSecretCache match {
// There exists a secret or the secret is stale
case Some(secretCached) => !secret.equals(secretCached) || checkIfRefreshNeeded(now)
// There is no secret
case None => true
}
if (shouldRefreshCache) {
storageAccountKeyMap.put(account, secret)
lastRefresh = now
false
} else {
true
}
}