This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new f84361e78f [#7464] improvement(conf): Update conf template with cache 
configuration settings. (#7470)
f84361e78f is described below

commit f84361e78f7cae5885ac7de05ef4eb247b391c81
Author: Lord of Abyss <[email protected]>
AuthorDate: Wed Jun 25 20:20:02 2025 +0800

    [#7464] improvement(conf): Update conf template with cache configuration 
settings. (#7470)
    
    ### What changes were proposed in this pull request?
    
    Update conf template with cache configuration settings and fix some typo
    issues.
    
    ### Why are the changes needed?
    
    Fix: #7464
    
    ### Does this PR introduce _any_ user-facing change?
    
    no
    
    ### How was this patch tested?
    
    local test
---
 conf/gravitino.conf.template                         | 15 +++++++++++++++
 core/src/main/java/org/apache/gravitino/Configs.java |  5 +++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/conf/gravitino.conf.template b/conf/gravitino.conf.template
index 9b1c2512cf..418d14f14c 100644
--- a/conf/gravitino.conf.template
+++ b/conf/gravitino.conf.template
@@ -59,6 +59,21 @@ gravitino.entity.store.relational.jdbcPassword = gravitino
 # The interval in milliseconds to evict the catalog cache
 gravitino.catalog.cache.evictionIntervalMs = 3600000
 
+# THE CONFIGURATION FOR Gravitino Entity Cache
+# Whether to enable the cached Entity store.
+gravitino.cache.enabled = true
+# Maximum number of entries allowed in the cache (effective only when weighted 
eviction is disabled).
+gravitino.cache.maxEntries = 10000
+# Time-to-live (TTL) for each cache entry after it is written, in milliseconds.
+gravitino.cache.expireTimeInMs = 3600000
+# Whether to enable cache statistics logging (e.g., hit/miss count, load 
failures, current size).
+gravitino.cache.enableStats = false
+# Whether to enable weighted cache eviction.
+# If enabled, cache entries are evicted based on their weight rather than 
count.
+gravitino.cache.enableWeigher = true
+# The cache implementation to use (e.g., caffeine).
+gravitino.cache.implementation = caffeine
+
 # THE CONFIGURATION FOR authorization
 # Whether Gravitino enable authorization or not
 gravitino.authorization.enable = false
diff --git a/core/src/main/java/org/apache/gravitino/Configs.java 
b/core/src/main/java/org/apache/gravitino/Configs.java
index 76f5235f6f..dd06a0496c 100644
--- a/core/src/main/java/org/apache/gravitino/Configs.java
+++ b/core/src/main/java/org/apache/gravitino/Configs.java
@@ -347,7 +347,7 @@ public class Configs {
   // Whether to enable cache store
   public static final ConfigEntry<Boolean> CACHE_ENABLED =
       new ConfigBuilder("gravitino.cache.enabled")
-          .doc("Whether to enable cache store.")
+          .doc("Whether to enable the cached Entity store.")
           .version(ConfigConstants.VERSION_1_0_0)
           .booleanConf()
           .createWithDefault(true);
@@ -365,7 +365,8 @@ public class Configs {
   public static final ConfigEntry<Long> CACHE_EXPIRATION_TIME =
       new ConfigBuilder("gravitino.cache.expireTimeInMs")
           .doc(
-              "Time in milliseconds after which a cache entry expires. Default 
is 3,600,000 ms (1 hour).")
+              "Time-to-live (TTL) for each cache entry after it is written, in 
milliseconds."
+                  + "Default is 3,600,000 ms (1 hour).")
           .version(ConfigConstants.VERSION_1_0_0)
           .longConf()
           .checkValue(value -> value >= 0, 
ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)

Reply via email to