docs: CmsFlexCacheEntry processCacheEntry() throws IOException {
  
          if (isSuspended() && (m_bufferRedirect == null)) {
              // an included element redirected this response, no cache entry must be produced
              return null;
          }
          if (m_cachingRequired) {
              // cache entry must only be calculated if it's actually needed (always true if we write only to buffer)
              m_cachedEntry = new CmsFlexCacheEntry();
              if (m_bufferRedirect != null) {
                  // only set et cached redirect target
                  m_cachedEntry.setRedirect(m_bufferRedirect, m_redirectPermanent);
              } else {
                  // add cached headers
                  m_cachedEntry.addHeaders(m_bufferHeaders);
                  // add cached output
                  if (m_includeList != null) {
                      // probably JSP: we must analyze out stream for includes calls
                      // also, m_writeOnlyToBuffer must be "true" or m_includeList can not be != null
                      processIncludeList();
                  } else {
                      // output is delivered directly, no include call parsing required
                      m_cachedEntry.add(getWriterBytes());
                  }
              }
              // update the "last modified" date for the cache entry
              m_cachedEntry.complete();
          }
          // in case the output was only buffered we have to re-write it to the "right" stream
          if (m_writeOnlyToBuffer) {
  
              // since we are processing a cache entry caching is not required
              m_cachingRequired = false;
  
              if (m_bufferRedirect != null) {
                  // send buffered redirect, will trigger redirect of top response
                  sendRedirect(m_bufferRedirect, m_redirectPermanent);
              } else {
                  // process the output
                  if (m_parentWritesOnlyToBuffer) {
                      // write results back to own stream, headers are already in buffer
                      if (m_out != null) {
                          try {
                              m_out.clear();
                          } catch (Exception e) {
                              if (LOG.isDebugEnabled()) {
                                  LOG.debug(
                                      Messages.get().getBundle().key(
                                          Messages.LOG_FLEXRESPONSE_ERROR_FLUSHING_OUTPUT_STREAM_1,
                                          e));
                              }
                          }
                      } else {
                          if (LOG.isDebugEnabled()) {
                              LOG.debug(
                                  Messages.get().getBundle().key(Messages.LOG_FLEXRESPONSE_ERROR_OUTPUT_STREAM_NULL_0));
                          }
                      }
                      writeCachedResultToStream(this);
                  } else {
                      // we can use the parent stream
                      processHeaders(m_headers, m_res);
                      writeCachedResultToStream(m_res);
                  }
              }
          }
          return m_cachedEntry;
      }