snazy commented on code in PR #2022: URL: https://github.com/apache/polaris/pull/2022#discussion_r2205029128
########## polaris-core/src/main/java/org/apache/polaris/core/storage/cache/StorageCredentialCache.java: ########## @@ -46,15 +46,13 @@ public class StorageCredentialCache { private static final Logger LOGGER = LoggerFactory.getLogger(StorageCredentialCache.class); - private static final long CACHE_MAX_NUMBER_OF_ENTRIES = 10_000L; - private final LoadingCache<StorageCredentialCacheKey, StorageCredentialCacheEntry> cache; /** Initialize the creds cache */ - public StorageCredentialCache() { + public StorageCredentialCache(StorageCredentialCacheConfig cacheConfig) { cache = Caffeine.newBuilder() - .maximumSize(CACHE_MAX_NUMBER_OF_ENTRIES) + .maximumSize(cacheConfig.maxEntryCount()) Review Comment: Not related to this PR, but related to [Nessie's persistence cache, discussing with Ben Manes](https://github.com/projectnessie/nessie/pull/10629), we opted to add those as well: ``` .executor(Runnable::run) .scheduler(Scheduler.systemScheduler()) ``` ########## polaris-core/src/main/java/org/apache/polaris/core/storage/cache/StorageCredentialCache.java: ########## @@ -46,15 +46,13 @@ public class StorageCredentialCache { private static final Logger LOGGER = LoggerFactory.getLogger(StorageCredentialCache.class); - private static final long CACHE_MAX_NUMBER_OF_ENTRIES = 10_000L; - private final LoadingCache<StorageCredentialCacheKey, StorageCredentialCacheEntry> cache; /** Initialize the creds cache */ - public StorageCredentialCache() { + public StorageCredentialCache(StorageCredentialCacheConfig cacheConfig) { cache = Caffeine.newBuilder() - .maximumSize(CACHE_MAX_NUMBER_OF_ENTRIES) + .maximumSize(cacheConfig.maxEntryCount()) Review Comment: Maybe not in this PR, but mentioning for posterity. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org