Class TickedCache<T>

java.lang.Object
org.kingdoms.utils.cache.TickedCache<T>
Type Parameters:
T - the type of the cached object.

public class TickedCache<T> extends 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 Details

    • TickedCache

      public TickedCache(int expirationTicks)
  • Method Details

    • hasExpired

      public boolean hasExpired()
    • invalidate

      public void invalidate()
    • getValue

      public T getValue()
    • update

      public void update(T value)