code: 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;
      }
docs: Test if an object is present in cache.
  @param key is the key of the object.
  @return true if the object is present in cache, false otherwise.