jodd.cache.NoCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jodd-core Show documentation
Show all versions of jodd-core Show documentation
Jodd Core tools and utilities, including type converters, JDateTime, cache etc.
// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.
package jodd.cache;
import java.util.Iterator;
/**
* Simple no-cache implementations of {@link Cache} for situation when cache
* needs to be quickly turned-off.
*/
public class NoCache implements Cache {
public int getCacheSize() {
return 0;
}
public long getCacheTimeout() {
return 0;
}
public void put(K key, V object) {
// ignore
}
public void put(K key, V object, long timeout) {
// ignore
}
public V get(K key) {
return null;
}
public Iterator iterator() {
return null;
}
public int prune() {
return 0;
}
public boolean isFull() {
return true;
}
public void remove(K key) {
// ignore
}
public void clear() {
// ignore
}
public int size() {
return 0;
}
public boolean isEmpty() {
return true;
}
}