snazy commented on code in PR #2029:
URL: https://github.com/apache/polaris/pull/2029#discussion_r2205452085


##########
polaris-core/src/main/java/org/apache/polaris/core/storage/cache/StorageCredentialCacheKey.java:
##########
@@ -18,118 +18,51 @@
  */
 package org.apache.polaris.core.storage.cache;
 
-import java.util.Objects;
+import jakarta.annotation.Nullable;
 import java.util.Set;
 import org.apache.polaris.core.entity.PolarisEntity;
 import org.apache.polaris.core.entity.PolarisEntityConstants;
+import org.apache.polaris.immutables.PolarisImmutable;
+import org.immutables.value.Value;
 
-public class StorageCredentialCacheKey {
+@PolarisImmutable
+public interface StorageCredentialCacheKey {
 
-  private final String realmId;
-  private final long catalogId;
+  @Value.Parameter(order = 1)
+  String realmId();
 
-  /** The serialized string of the storage config. */
-  private final String storageConfigSerializedStr;
+  @Value.Parameter(order = 2)
+  long catalogId();
 
-  /**
-   * The entity id is passed to be used to fetch subscoped creds, but is not 
used to do hash/equals
-   * as part of the cache key.
-   */

Review Comment:
   Not sure whether I already mentioned it, but I'm not sure the 
`StorageCredentialCache` works as expected, because when credentials are 
retrieved from the cache, we only know that those are valid at the time of 
retrieval, but not _how long_ those will be valid (for a client), it could be 
0.1ms or 30days.



-- 
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

Reply via email to