Class CacheConfig

java.lang.Object
ortus.boxlang.runtime.config.segments.CacheConfig

public class CacheConfig extends Object
A BoxLang cache configuration This is a configuration segment for a cache engine The default name is 'default' The default provider is 'BoxCacheProvider' The default properties are based on the DEFAULTS struct
  • Field Details

    • name

      public Key name
      The name of the cache engine, default is ='default'
    • provider

      public Key provider
      The default cache engine provider is BoxCacheProvider
    • properties

      public IStruct properties
      The properties for the cache engine, based on DEFAULTS
    • DEFAULTS

      public static final IStruct DEFAULTS
      BoxLang Cache Provider Defaults
  • Constructor Details

    • CacheConfig

      public CacheConfig()
      Default Empty Constructor
    • CacheConfig

      public CacheConfig(Key name, Key provider, IStruct properties)
      Constructor by name, provider and properties
      Parameters:
      name - The key name of the cache engine
      provider - The name of the cache provider
      properties - The properties of the cache engine
    • CacheConfig

      public CacheConfig(Key name, IStruct properties)
      Constructor by name and properties
      Parameters:
      name - The key name of the cache engine
      properties - The properties of the cache engine
    • CacheConfig

      public CacheConfig(Key name)
      Constructor by name of a boxCacheProvider
      Parameters:
      name - The key name of the cache engine
    • CacheConfig

      public CacheConfig(String name)
      Constructor by string name
      Parameters:
      name - The string name of the cache engine
  • Method Details

    • process

      public CacheConfig process(IStruct config)
      Processes the configuration struct. Each segment is processed individually from the initial configuration struct.
      Parameters:
      config - the configuration struct
      Returns:
      the configuration
    • processProperties

      public CacheConfig processProperties(IStruct properties)
      This processes a struct of properties for a BoxLang cache engine
      Parameters:
      properties - The properties to process
      Returns:
      the configuration
    • toStruct

      public IStruct toStruct()
      Returns the configuration as a struct * Remember that this is what the context's use to build runtime/request configs, so don't use any references