cgivre commented on code in PR #2929: URL: https://github.com/apache/drill/pull/2929#discussion_r1796148833
########## contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkSchema.java: ########## @@ -38,19 +40,32 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.TimeUnit; public class SplunkSchema extends AbstractSchema { private final static Logger logger = LoggerFactory.getLogger(SplunkSchema.class); private static final String SPL_TABLE_NAME = "spl"; private final Map<String, DynamicDrillTable> activeTables = new HashMap<>(); private final SplunkStoragePlugin plugin; private final String queryUserName; + private final Cache<String, Set<String>> cache; + private final boolean useCache; public SplunkSchema(SplunkStoragePlugin plugin, String queryUserName) { super(Collections.emptyList(), plugin.getName()); this.plugin = plugin; this.queryUserName = queryUserName; - + this.useCache = plugin.getConfig().getCacheExpiration() >= 0; + + if (useCache) { + logger.debug("Using splunk schema cache for {}", plugin.getName()); Review Comment: Done -- 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: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org