code: private Artifact<?> emitLandingPageCacheManifest(LinkerContext context, TreeLogger logger,
        ArtifactSet artifacts, String[] staticFiles) throws UnableToCompleteException {
      // Create a string of cacheable resources
      StringBuilder publicSourcesSb = new StringBuilder();
      StringBuilder publicStaticSourcesSb = new StringBuilder();
  
      // Iterate over all emitted artifacts, and collect all cacheable artifacts
      for (@SuppressWarnings("rawtypes")
      Artifact artifact : artifacts) {
        if (artifact instanceof EmittedArtifact) {
          EmittedArtifact ea = (EmittedArtifact) artifact;
          String path = "/" + context.getModuleFunctionName() + "/" + ea.getPartialPath();
  
          if (accept(path)) {
            publicSourcesSb.append(path + "\n");
          }
        }
      }
  
      // Iterate over all static files
      if (staticFiles != null) {
        for (String staticFile : staticFiles) {
          if (accept(staticFile)) {
            publicStaticSourcesSb.append(staticFile + "\n");
          }
        }
      }
  
      // build cache list
      StringBuilder sb = new StringBuilder();
      sb.append("CACHE MANIFEST\n");
      sb.append("# Unique id #" + (new Date()).getTime() + "." + Math.random() + "\n");
      // we have to generate this unique id because the resources can change but
      // the hashed cache.html files can remain the same.
      sb.append("# Note: must change this every time for cache to invalidate\n");
      sb.append("\n");
      sb.append("CACHE:\n");
      sb.append(publicSourcesSb.toString());
      sb.append("# Static cached files\n");
      sb.append(publicStaticSourcesSb.toString());
      sb.append("\n\n");
      sb.append("# All other resources require the user to be online.\n");
      sb.append("NETWORK:\n");
      sb.append("*\n");
  
      logger.log(TreeLogger.DEBUG, "Make sure you have the following"
          + " attribute added to your landing page's <html> tag: <html manifest=\""
          + context.getModuleFunctionName() + "/" + MANIFEST + "\">");
  
      // Create the manifest as a new artifact and return it:
      return emitString(logger, sb.toString(), MANIFEST);
    }
docs: Creates the cache-manifest resource specific for the landing page.