code: public CharBuffer getCachedContent(JavaFileObject file) {
          ContentCacheEntry e = contentCache.get(file);
          if (e == null)
              return null;
  
          if (!e.isValid(file)) {
              contentCache.remove(file);
              return null;
          }
  
          return e.getValue();
      }
docs: <editor-fold defaultstate="collapsed" desc="Content cache">