org.babyfish.jimmer.sql.cache.Cache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-sql Show documentation
Show all versions of jimmer-sql Show documentation
A revolutionary ORM framework for both java and kotlin
package org.babyfish.jimmer.sql.cache;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
public interface Cache {
default V get(K key, QueryCacheEnvironment env) {
Map map = getAll(Collections.singleton(key), env);
return map.get(key);
}
Map getAll(Collection keys, QueryCacheEnvironment env);
default void delete(K key, CacheEnvironment env) {
deleteAll(Collections.singleton(key), env);
}
void deleteAll(Collection keys, CacheEnvironment env);
}