jerryshao commented on code in PR #7200:
URL: https://github.com/apache/gravitino/pull/7200#discussion_r2115444831
##########
core/src/main/java/org/apache/gravitino/Configs.java:
##########
@@ -343,4 +343,50 @@ private Configs() {}
.stringConf()
.toSequence()
.createWithDefault(Collections.emptyList());
+
+ // Whether to enable cache store
+ public static final ConfigEntry<Boolean> CACHE_ENABLED =
+ new ConfigBuilder("gravitino.cache.enabled")
+ .doc("Whether to enable cache store.")
+ .version(ConfigConstants.VERSION_0_10_0)
+ .booleanConf()
+ .createWithDefault(true);
+
+ // Maximum number of entries in the cache
+ public static final ConfigEntry<Integer> CACHE_MAX_ENTRIES =
+ new ConfigBuilder("gravitino.cache.maxEntries")
+ .doc("Maximum number of entries allowed in the cache.")
+ .version(ConfigConstants.VERSION_0_10_0)
+ .intConf()
+ .checkValue(value -> value > 0,
ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
+ .createWithDefault(10_000);
+
+ // Cache entry expiration time
+ 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).")
+ .version(ConfigConstants.VERSION_0_10_0)
+ .longConf()
+ .checkValue(value -> value > 0,
ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
Review Comment:
You should allow setting 0 as a configuration value.
--
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]