Abyss-lord commented on code in PR #7354:
URL: https://github.com/apache/gravitino/pull/7354#discussion_r2142004335


##########
core/src/main/java/org/apache/gravitino/storage/relational/RelationalEntityStore.java:
##########
@@ -54,12 +61,28 @@ public class RelationalEntityStore
           Configs.DEFAULT_ENTITY_RELATIONAL_STORE, 
JDBCBackend.class.getCanonicalName());
   private RelationalBackend backend;
   private RelationalGarbageCollector garbageCollector;
+  private EntityCache cache;
+  private Set<Namespace> namespaceSet;
+  private boolean cacheEnabled;
+
+  /**
+   * Return whether the cache is enabled or not.
+   *
+   * @return {@code true} if cache is enable, otherwise {@code false}
+   */
+  public boolean cacheEnabled() {
+    return cacheEnabled;
+  }
 
   @Override
   public void initialize(Config config) throws RuntimeException {
     this.backend = createRelationalEntityBackend(config);
     this.garbageCollector = new RelationalGarbageCollector(backend, config);
     this.garbageCollector.start();
+    this.cacheEnabled = config.get(Configs.CACHE_ENABLED);
+    this.namespaceSet = Sets.newHashSet();

Review Comment:
   @jerryshao  We've removed the usage of namespaceSet — the current 
implementation of `list() `no longer caches the returned entities into the 
cache layer. So now, each call to `list()` simply delegates to the backend 
without tracking or caching by namespace.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to