Indhumathi27 commented on a change in pull request #3580: [CARBONDATA-3665] 
Support TimeBased Cache expiration using Guava Cache
URL: https://github.com/apache/carbondata/pull/3580#discussion_r369371985
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/cache/CarbonLRUCache.java
 ##########
 @@ -95,9 +98,17 @@ public CarbonLRUCache(String propertyName, String 
defaultPropertyName) {
    * initialize lru cache
    */
   private void initCache() {
+    // get duration for cache expiration if configured
+    long duration = 
CarbonCommonConstants.CARBON_LRU_CACHE_EXPIRATION_DURATION_IN_MINUTES_DEFAULT;
+    String timeBasedExpiration = CarbonProperties.getInstance()
+        
.getProperty(CarbonCommonConstants.CARBON_LRU_CACHE_EXPIRATION_DURATION_IN_MINUTES);
+    if (null != timeBasedExpiration) {
+      duration = Long.parseLong(timeBasedExpiration);
 
 Review comment:
   Configuration is already validated in 
`core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java`. 
Please check

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to