code: @SuppressWarnings("unchecked")
      public static <T> T connectCache(Runnable runnable, Object cachedValue) {
          THREAD_LOCAL.set(Optional.fromNullable(cachedValue));
          @Cleanup QuietCloseable i = () -> THREAD_LOCAL.remove();
  
          runnable.run();
          return (T) THREAD_LOCAL.get().orNull();
      }
docs: Connect the cache with the new cached value.
  
  @param runnable    Runnable to call cached method.
  @param cachedValue new cached value
  @param <T>         cached value type
  @return cached value.