check whether the key exists.

@param cacheConfigBean the cache data source.
@param cacheKey        the key of the key
@return true if exists otherwise false.
192387
public static Single<Boolean> exists(CacheConfigBean cacheConfigBean, String cacheKey) {
        return SingleRxXian.call(CacheService.CACHE_SERVICE, "cacheExists", new JSONObject() {{
            put("cacheConfig", cacheConfigBean);
            put("key", cacheKey);
        }}).map(unitResponse -> {
            unitResponse.throwExceptionIfNotSuccess();
            return (boolean) unitResponse.getData();
        });
    }
415383
private boolean checkInStagingAreaAndFileCache(final CacheKey key) {
    EncodedImage result = mStagingArea.get(key);
    if (result != null) {
      result.close();
      FLog.v(TAG, "Found image for %s in staging area", key.getUriString());
      mImageCacheStatsTracker.onStagingAreaHit(key);
      return true;
    } else {
      FLog.v(TAG, "Did not find image for %s in staging area", key.getUriString());
      mImageCacheStatsTracker.onStagingAreaMiss();
      try {
        return mFileCache.hasKey(key);
      } catch (Exception exception) {
        return false;
      }
    }
  }
1337230
public boolean hasElementWithKey(String key) {

        for (CmsContainerConfiguration configuration : m_parentConfigurations) {
            if (configuration.getNewElements().containsKey(key)) {
                return true;
            }
        }
        return false;
    }
795663
public boolean remove(final CacheKey key) {
    Preconditions.checkNotNull(key);
    final EncodedImage encodedImage;
    synchronized (this) {
      encodedImage = mMap.remove(key);
    }
    if (encodedImage == null) {
      return false;
    }
    try {
      return encodedImage.isValid();
    } finally {
      encodedImage.close();
    }
  }
1216189
public boolean contains(String key) {
        if (!ramMode.equals(DualCacheRamMode.DISABLE) && ramCacheLru.snapshot().containsKey(key)) {
            return true;
        }
        try {
            dualCacheLock.lockDiskEntryWrite(key);
            if (!diskMode.equals(DualCacheDiskMode.DISABLE) && diskLruCache.get(key) != null) {
                return true;
            }
        } catch (IOException e) {
            logger.logError(e);
        } finally {
            dualCacheLock.unLockDiskEntryWrite(key);
        }
        return false;
    }
726450
public static Single<Long> remove(String cacheKey, Object value) {
        return remove(CacheService.CACHE_CONFIG_BEAN, cacheKey, value);
    }
368615
public static Completable clear(CacheConfigBean cacheConfigBean, String cacheKey) {
        return SingleRxXian.call(CacheService.CACHE_SERVICE, "cacheListClear", new JSONObject() {{
            put("cacheConfig", cacheConfigBean);
            put("key", cacheKey);
        }}).toCompletable();
    }
1272944
public static boolean containsKey(final String _key)
    {
        final Cache<String, BundleInterface> cache = InfinispanCache.get()
                        .<String, BundleInterface>getIgnReCache(BundleMaker.CACHE4BUNDLE);
        return cache.containsKey(_key);
    }
844060
public static function has($key, $config = null)
    {
        $config = ($config === null) ? self::$config : $config;

        if (!isset($config[$key]) && !array_key_exists($key, $config)) {
            return false;
        }

        return true;
    }
286913
@Override
    public boolean isDataInCache(Class<?> clazz, Object cacheKey, long maxTimeInCacheBeforeExpiry) throws CacheCreationException {
        return getObjectPersister(clazz).isDataInCache(cacheKey, maxTimeInCacheBeforeExpiry);
    }
950098
public boolean containsKey(final long key) {
        int index = longHash(key, mask);
        while (null != values[index]) {
            if (key == keys[index]) {
                return true;
            }
            index = ++index & mask;
        }
        return false;
    }
1029154
public function exists( $key, $lifetime )
    {
        if ( !$this->cache_dir )
        {
            $this->initializeCacheDir();
        }

        if ( !file_exists($this->cache_dir . $key . ".html") )
        {
            return false;
        }

        $file_lifetime = time() - filectime( $this->cache_dir . $key . ".html" );

        if ( $file_lifetime > $lifetime )
        {
            $this->delete( $key );
            return false;
        }

        return true;
    }
223711
public static Single<Long> addAll(CacheConfigBean cacheConfigBean, String key, Set members) {
        return SingleRxXian.call(CacheService.CACHE_SERVICE, "cacheSetAdd", new JSONObject() {{
            put("cacheConfig", cacheConfigBean);
            put("key", key);
            put("members", members);
        }}).map(unitResponseObject -> {
            unitResponseObject.throwExceptionIfNotSuccess();
            if (unitResponseObject.getData() == null)
                return 0L;
            return unitResponseObject.dataToLong();
        });
    }
529387
protected boolean isConfigTrue(IConfigKey key) {
        String value = getConfig(key);
        if (value == null) {
            return false;
        }
        value = value.toLowerCase();
        return TRUE.equals(value);
    }
425619
public function find($cacheKey)
    {
        $key = array_search($cacheKey, $this->cachedKeys);

        if ($key != false and ! $this->cache->has($key))
        {
            unset($this->cachedKeys[$key]);
            $this->storeCachedKeys();

            return false;
        }

        return $key ? $this->cache->get($key) : false;
    }
9117
public function has($key)
    {
        /* If $key is not valid string throws InvalidArgumentException */
        if (!$this->isString($key)) {
            throw new InvalidArgumentException('Cache key must be not empty string');
        }

        return $this->getCollection()->has($key);
    }
726348
public static Single<Boolean> addAll(String cacheKey, List list) {
        return addAll(CacheService.CACHE_CONFIG_BEAN, cacheKey, list);
    }