docs: @SuppressWarnings("unchecked")
      @Override
      public final PipelineEventReader<R, E> getEventReader(
              HttpServletRequest request, HttpServletResponse response) {
          if (Included.PLAIN == this.resourcesElementsProvider.getDefaultIncludedType()) {
              this.logger.trace(
                      "{} - Resoure Aggregation Disabled, ignoring event cache and returning parent event reader directly",
                      this.beanName);
              return this.wrappedComponent.getEventReader(request, response);
          }
  
          // Get the key for this request from the target component and see if there is a cache entry
          final CacheKey cacheKey = this.wrappedComponent.getCacheKey(request, response);
          Element element = this.cache.get(cacheKey);
          CachedEventReader<E> cachedEventReader = null;
          if (element != null) {
              cachedEventReader = (CachedEventReader<E>) element.getObjectValue();
          }
  
          // If there was a cached reader return it immediately
          if (cachedEventReader == null) {
              // No cached data for key, call target component to get events and an updated cache key
              logger.debug(
                      "{} - No cached events found for key {}, calling parent",
                      this.beanName,
                      cacheKey);
              final PipelineEventReader<R, E> pipelineEventReader =
                      this.wrappedComponent.getEventReader(request, response);
  
              // Copy the events from the reader into a buffer to be cached
              final List<E> eventCache = new LinkedList<E>();
              for (final E event : pipelineEventReader) {
                  // TODO add de-duplication logic here
                  eventCache.add(event);
              }
  
              final Map<String, String> outputProperties = pipelineEventReader.getOutputProperties();
              cachedEventReader =
                      new CachedEventReader<E>(
                              eventCache, new LinkedHashMap<String, String>(outputProperties));
  
              // Cache the buffer
              element = new Element(cacheKey, cachedEventReader);
              this.cache.put(element);
              logger.debug(
                      "{} - Cached {} events for key {}", this.beanName, eventCache.size(), cacheKey);
          } else {
              logger.debug("{} - Found cached events for key {}", this.beanName, cacheKey);
          }
  
          final List<E> eventCache = cachedEventReader.getEventCache();
          final Map<String, String> outputProperties = cachedEventReader.getOutputProperties();
  
          final R eventReader = this.createEventReader(eventCache.listIterator());
          return new PipelineEventReaderImpl<R, E>(eventReader, outputProperties);
      }