InteractiveBoard Docs
  • GETTING STARTED
    • Installing InteractiveBoard
    • Commands & Permissions
    • Integrations
    • Creating a board
  • Objects
    • General Information
      • Enabled
      • Properties & Placeholders
      • Conditions
      • Layout
      • Click and Hover
      • Children
      • Cache Behavior
    • Background
    • Button
    • Gif
    • Image
    • Scroll Pane
    • Skin Objects
    • Text Objects
    • Static
      • Action Listener
      • Music Player
      • Delayed Function Timer
      • Repeat Function Timer
  • Functions
    • General Information
      • Conditions
      • Delay
      • Price
    • Switch Scene
    • Game
      • Command
      • Open Crafting Table
      • Play Sound
      • Send Message
      • Switch Server
    • State
      • Scroll Change
      • Enabled
        • Set Enabled State
        • Switch Enabled State
      • Playback
        • Set Playback State
        • Switch Playback State
    • Shop
  • Conditions
    • Has money
    • Permission
  • BOARD SETTINGS
    • General
    • Displays
    • View Grouping & Default Scenes
Powered by GitBook
On this page
  1. Objects
  2. General Information

Cache Behavior

Last updated 2 months ago

Various objects cache expensive to compute/fetch data (image, gif, skin_3d, head_3d, etc.) for better performance and reduced memory consumption. However, in cases where the data being cached is unique, local caching is a better solution. If the unique cached data (like per player images) accumulates in cache over time, it will result in high memory consumption.

Cache Behavior Modes

  • Global

    • Best option for static data, like image or gif files, or other data that is used commonly.

    • Only gets cleared when is executed.

  • View

    • Best option for unique/dynamic data, that would not be reused after the player leaves.

    • Gets cleared together with the board view getting cleared. The exact behavior of this depends on the reset-radius-on-exit (General) setting. If reset-radius-on-exit is set to true, the cache will get cleared as soon as the player exits the radius of the board. If it is set to false, the cache will clear after the player leaves the server.

Every board object that stores data has the cache-behavior: setting.

## image1 is an example of a dynamically fetched image.
## Since the image is unique to each player in this example, it is important 
## that the image is cleared from cache after the player leaves the server.
image1:
  type: image
  size: 512 512
  ## the cache behavior setting (global, view)
  ## in this case set to view (global is the default)
  cache-behavior: view
  image:
    ## example image URL that is unique to each player
    name: 'https://example.com/statistics/%player_name%/summary-image.png'
/ib reload