Code example for LoadingCache

Methods: put

0
   @Override 
   public URI apply(String input) {
      Optional<CDNContainerApi> cdnExtension = sync.getCDNExtension();
      checkArgument(cdnExtension.isPresent(), "CDN is required, but the extension is not available!");
      URI uri = cdnExtension.get().enable(input);
      cdnContainer.put(input, uri);
      return uri;
   } 
 
}