jdash.client.cache.CaffeineCache Maven / Gradle / Ivy
package jdash.client.cache;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import jdash.client.request.GDRequest;
import java.util.Objects;
import java.util.Optional;
import java.util.function.UnaryOperator;
class CaffeineCache implements GDCache {
private final Cache cache;
CaffeineCache(UnaryOperator> caffeineBuilder) {
Objects.requireNonNull(caffeineBuilder);
this.cache = caffeineBuilder.apply(Caffeine.newBuilder()).build();
}
@Override
public Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy