Record: CacheConfig

Represents configurations for the cache:Cache object.

Closed record

Fields

  • capacity int(default 100)
  • Maximum number of entries allowed in the cache

  • evictionFactor float(default 0.25)
  • The factor by which the entries will be evicted once the cache is full

  • evictionPolicy EvictionPolicy(default LRU)
  • The policy which is used to evict entries once the cache is full

  • defaultMaxAge decimal(default -1)
  • The default value in seconds which all the cache entries are valid. '-1' means, the entries are valid forever. This will be overwritten by the the maxAge property set when inserting item to the cache

  • cleanupInterval decimal?
  • Interval (in seconds) of the timer task, which will clean up the cache