docs: void registerContent(
              final String pCacheURI,
              final CacheRequest pRequest,
              final CachedResponse pCachedResponse
      ) throws IOException {
          // System.out.println(" ## HTTPCache ## Registering content for " + pCacheURI);
  
  //        pRequest.removeAttribute(ATTRIB_IS_STALE);
  //        pRequest.setAttribute(ATTRIB_CACHED_RESPONSE, pCachedResponse);
  
          if ("HEAD".equals(pRequest.getMethod())) {
              // System.out.println(" ## HTTPCache ## Was HEAD request, will NOT store content.");
              return;
          }
  
          // TODO: Several resources may have same extension...
          String extension = MIMEUtil.getExtension(pCachedResponse.getHeaderValue(HEADER_CONTENT_TYPE));
          if (extension == null) {
              extension = "[NULL]";
          }
  
          synchronized (contentCache) {
              contentCache.put(pCacheURI + '.' + extension, pCachedResponse);
  
              // This will be the default version
              if (!contentCache.containsKey(pCacheURI)) {
                  contentCache.put(pCacheURI, pCachedResponse);
              }
          }
  
          // Write the cached content to disk
          File content = new File(tempDir, "./" + pCacheURI + '.' + extension);
          if (deleteCacheOnExit && !content.exists()) {
              content.deleteOnExit();
          }
  
          File parent = content.getParentFile();
          if (!(parent.exists() || parent.mkdirs())) {
              log("Could not create directory " + parent.getAbsolutePath());
  
              // TODO: Make sure vary-info is still created in memory
  
              return;
          }
  
          OutputStream mContentStream = new BufferedOutputStream(new FileOutputStream(content));
  
          try {
              pCachedResponse.writeContentsTo(mContentStream);
          }
          finally {
              try {
                  mContentStream.close();
              }
              catch (IOException e) {
                  log("Error closing content stream: " + e.getMessage(), e);
              }
          }
  
          // Write the cached headers to disk (in pseudo-properties-format)
          File headers = new File(content.getAbsolutePath() + FILE_EXT_HEADERS);
          if (deleteCacheOnExit && !headers.exists()) {
              headers.deleteOnExit();
          }
  
          FileWriter writer = new FileWriter(headers);
          PrintWriter headerWriter = new PrintWriter(writer);
          try {
              String[] names = pCachedResponse.getHeaderNames();
  
              for (String name : names) {
                  String[] values = pCachedResponse.getHeaderValues(name);
  
                  headerWriter.print(name);
                  headerWriter.print(": ");
                  headerWriter.println(StringUtil.toCSVString(values, "\\"));
              }
          }
          finally {
              headerWriter.flush();
              try {
                  writer.close();
              }
              catch (IOException e) {
                  log("Error closing header stream: " + e.getMessage(), e);
              }
          }
  
          // TODO: Make this more robust, if some weird entity is not
          // consistent in it's vary-headers..
          // (sometimes Vary, sometimes not, or somtimes different Vary headers).
  
          // Write extra Vary info to disk
          String[] varyHeaders = pCachedResponse.getHeaderValues(HEADER_VARY);
  
          // If no variations, then don't store vary info
          if (varyHeaders != null && varyHeaders.length > 0) {
              Properties variations = getVaryProperties(pCacheURI);
  
              String vary = StringUtil.toCSVString(varyHeaders);
              variations.setProperty(HEADER_VARY, vary);
  
              // Create Vary-key and map to file extension...
              String varyKey = createVaryKey(varyHeaders, pRequest);
  //            System.out.println("varyKey: " + varyKey);
  //            System.out.println("extension: " + extension);
              variations.setProperty(varyKey, extension);
  
              storeVaryProperties(pCacheURI, variations);
          }
      }