code: public static void endRequest() {
          final List<RequestScopedItem> result = CACHE.get();
          if (result != null) {
              CACHE.remove();
              for (final RequestScopedItem item : result) {
                  item.invalidate();
              }
          }
      }
docs: ends the request and clears the cache. This can be called before the request is over,
  in which case the cache will be unavailable for the rest of the request.