algoliasearch/src/main/java/com/algolia/search/saas/ExpiringCache.java
synchronized public V get(K key) {
        final Pair<V, Long> cachePair = lruCache.get(key);
        if (cachePair != null && cachePair.first != null) {
            if (cachePair.second > System.currentTimeMillis()) {
                return cachePair.first;
            } else {
                lruCache.remove(key);
            }
        }
        return null;
    }
synchronized public V get(K key) {
        final Pair<V, Long> cachePair = lruCache.get(key);
        if (cachePair != null && cachePair.first != null) {
            if (cachePair.second > System.currentTimeMillis()) {
                return cachePair.first;
            } else {
                lruCache.remove(key);
            }
        }
        return null;
    }
Get a value from the cache

@return the cached value if it is still valid, else null.