code: private static CacheProvider getCacheProvider(Method javaMethod) {
          if (!javaMethod.isAnnotationPresent(Cache.class)) {
              return null;
          }
  
          Cache an = javaMethod.getAnnotation(Cache.class);
          Class<? extends CacheProvider> cacheClazz = an.value();
  
          try {
              Constructor<? extends CacheProvider> constructor = cacheClazz.getDeclaredConstructor();
              constructor.setAccessible(true);
              return constructor.newInstance();
          } catch (Exception e) {
              throw new EventsException("Cannot instantiate cache provider "
                      + cacheClazz.getSimpleName() + " for method "
                      + Utils.methodToString(javaMethod), e);
          }
      }
docs: Retrieves cache provider instance for method