Code example for LoadingCache

Methods: getIfPresent

    return source.hash(Hashing.sha1());
  public boolean contains(Path path) {
    return loadingCache.getIfPresent(path) != null;
   * @return The {@link} of the contents of path. 
  public HashCode get(Path path) {
    HashCode sha1;
    try { 
      // Ignored paths will not generate file change events and so are not invalidated correctly. 
      // Where ignored paths are output files, they are generated by each build and will not 
      // generate cache hits so not caching them is likely a performance win in any case. 
      if (projectFilesystem.isIgnored(path)) {
        sha1 = getHashCode(path);
Stop searching for code, let great code find you!  Add Codota to your java IDE