@Override
    public Mono<Boolean> isExist(final String key) {
        final Cache<String, byte[]> cache = this.mainCache.get(key);
        if (Objects.isNull(cache) || !cache.asMap().containsKey(key)) {
            // remove from main cache
            this.mainCache.remove(key);
            return Mono.fromCallable(() -> Boolean.FALSE).subscribeOn(Schedulers.boundedElastic());
        }
        return Mono.fromCallable(() -> Boolean.TRUE).subscribeOn(Schedulers.boundedElastic());
    }
Check the cache is exist or not.

@param key the cache key
@return true exist
shenyu-plugin/shenyu-plugin-cache/shenyu-plugin-cache-memory/src/main/java/org/apache/shenyu/plugin/cache/memory/MemoryCache.java