Code example for LoadingCache

Methods: get

    public Map<String, Property> getTerminology(Locale locale) {
        try { 
            return terminologyCache.get(locale);
        } catch (ExecutionException e) {
            logger.error("Failed to retrieve termininology from cache. Skipping check.",e);
            return Collections.emptyMap();
    public Map<String, Property> load(Locale locale) throws Exception {
            //recreate the supplier in case we have terminology later 
            version  = Suppliers.memoize((Supplier<ProjectVersion>) this);
        ProjectVersion projectVersion = version.get();
Connect your IDE to all the code out there  Get Codota for Java