Code example for Cache

Methods: put

0
        return guavaCache.getIfPresent(cacheKey);
    } 
 
    @Override 
    public void setCache(EqlCacheKey cacheKey, Object result) {
        guavaCache.put(cacheKey, Optional.fromNullable(result));
    } 
 
    @Override 
    public void applyParams(String[] params) {
        String spec = params[0];
        guavaCache = CacheBuilder.from(spec).build();
    } 
} 
Experience pair programming with AI  Get Codota for Java