Class TimedCacheableProfileable

java.lang.Object
com.cryptomorin.xseries.profiles.objects.cache.CacheableProfileable
com.cryptomorin.xseries.profiles.objects.cache.TimedCacheableProfileable
All Implemented Interfaces:
Profileable
Direct Known Subclasses:
Profileable.GameProfileProfileable, Profileable.PlayerProfileable, Profileable.StringProfileable, Profileable.UsernameProfileable, Profileable.UUIDProfileable

@Internal public abstract class TimedCacheableProfileable extends CacheableProfileable
Any Profileable that can have its results cached temporarily. This class should not be used directly.
  • Constructor Details

    • TimedCacheableProfileable

      public TimedCacheableProfileable()
  • Method Details

    • expiresAfter

      @NotNull protected @NotNull Duration expiresAfter()
      The amount of time the cached results of this profile can be used until it's re-evaluated. By default, it uses the internal cache's expiration date (6 hours) Duration.ZERO or negative durations should not be used.
    • hasExpired

      public final boolean hasExpired(boolean renew)
      Overrides:
      hasExpired in class CacheableProfileable
      Returns:
      true if this profile hasn't been cached yet or the cache is expired.