code: public static boolean isNotModified(@NotNull ModificationDateProvider dateProvider,
        @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response) throws IOException {
      boolean isAuthor = WCMMode.fromRequest(request) != WCMMode.DISABLED;
      return isNotModified(dateProvider, request, response, isAuthor);
    }
docs: Compares the "If-Modified-Since header" of the incoming request with the last modification date of an aggregated
  resource. If the resource was not modified since the client retrieved the resource, a 304-redirect is send to the
  response (and the method returns true). If the resource has changed (or the client didn't) supply the
  "If-Modified-Since" header a "Last-Modified" header is set so future requests can be cached.
  <p>
  Expires header is automatically set on author instance, and not set on publish instance.
  </p>
  @param dateProvider abstraction layer that calculates the last-modification time of an aggregated resource
  @param request Request
  @param response Response
  @return true if the method send a 304 redirect, so that the caller shouldn't write any output to the response
  stream
  @throws IOException I/O exception