jerryshao commented on code in PR #7330:
URL: https://github.com/apache/gravitino/pull/7330#discussion_r2126995489


##########
core/src/main/java/org/apache/gravitino/GravitinoEnv.java:
##########
@@ -427,6 +439,10 @@ private void initBaseComponents() {
   private void initGravitinoServerComponents() {
     // Initialize EntityStore
     this.entityStore = EntityStoreFactory.createEntityStore(config);
+    if (config.get(Configs.CACHE_ENABLED)) {
+      this.entityCache = CaffeineEntityCache.getInstance(config, entityStore);
+      // TODO constructs a CachedEntityStore instance with the entityStore and 
entityCache
+    }

Review Comment:
   As I remember correctly, the cache implementation is pluggable, so we should 
have a factory to create the cache interface. Here, we directly created a 
caffeine cache, I think we need to update the code.
   
   Besides, should the cache be created after the entity store is initialized?



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