Class CacheSettings


  • public class CacheSettings
    extends java.lang.Object
    • Field Detail

      • GAME_OBJECTS_CACHE_TIMER

        public static final java.lang.String GAME_OBJECTS_CACHE_TIMER
        See Also:
        Constant Field Values
      • GROUND_ITEM_CACHE_TIMER

        public static final java.lang.String GROUND_ITEM_CACHE_TIMER
        See Also:
        Constant Field Values
      • WIDGET_CACHE_TIMER

        public static final java.lang.String WIDGET_CACHE_TIMER
        See Also:
        Constant Field Values
      • PLAYER_CACHE_TIMER

        public static final java.lang.String PLAYER_CACHE_TIMER
        See Also:
        Constant Field Values
      • WORLD_CACHE_TIMER

        public static final java.lang.String WORLD_CACHE_TIMER
        See Also:
        Constant Field Values
    • Constructor Detail

      • CacheSettings

        public CacheSettings()
    • Method Detail

      • setCacheTimer

        public static void setCacheTimer​(java.lang.String key,
                                         java.lang.Integer cacheTime)
        Sets a cache time for the given key.
        Parameters:
        key - Key of cache to set, see class docs for internal DreamBot timers
        cacheTime - Time in MS
      • getCacheTime

        public static int getCacheTime​(java.lang.String key)
        Gets the time in ms for a cache key
        Parameters:
        key - Key of cache to get, see class docs for internal DreamBot timers
        Returns:
        Time in MS for the given key, default of 0
      • resetToDefaults

        public static void resetToDefaults()
        Clears the cache timers and resets internal cache timers to defaults. See class docs for internal DreamBot cache timers and their defaults.