code: public static void setNonCachingHeaders(@NotNull HttpServletResponse response) {
      response.setHeader(HEADER_PRAGMA, "no-cache");
      response.setHeader(HEADER_CACHE_CONTROL, "no-cache");
      response.setHeader(HEADER_EXPIRES, "0");
      response.setHeader(HEADER_DISPATCHER, "no-cache");
    }
docs: Set headers to disallow caching in browser, proxy servers and dispatcher for the current response.
  @param response Current response