Package org.kingdoms.utils.cache
Class TickedCache<T>
java.lang.Object
org.kingdoms.utils.cache.TickedCache<T>
- Type Parameters:
T- the type of the cached object.
A very simple wrapper class that contains a cached object that is cached based on the
server ticks. Similar to Caffeine's
Cache.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TickedCache
public TickedCache(int expirationTicks)
-
-
Method Details
-
hasExpired
public boolean hasExpired() -
invalidate
public void invalidate() -
getValue
-
update
-