All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.greencheek.caching.herdcache.IsCachedValueUsable Maven / Gradle / Ivy

Go to download

A cache that uses futures to prevent thundering herds to your backend service

There is a newer version: 2.0.19
Show newest version
package org.greencheek.caching.herdcache;

import java.io.Serializable;
import java.util.function.Predicate;

/**
 * When a value is retrieved from the cache, this function can be called to determine
 * if that cached value is valid to use or not.  If not, the backend (the supplier) is called
 * to generate a value
 */
public interface IsCachedValueUsable extends Predicate {
    static final IsCachedValueUsable CACHED_VALUE_IS_ALWAYS_USABLE = (V) -> true;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy