Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SlidingProactiveExpirationPolicy<Key, Value, ArgumentsBundle>

Expiration policy which evicts keys based on time span access.
If key wasn't accessed in the specified SlidingExpirationPolicyArgsBundle.timeSpan, it will be evicted by GarbageCollector in the background.
If key was accessed in that time span, it's expiration time will be increased with the value of time span.

Type parameters

Hierarchy

  • AbstractExpirationPolicy<Key, Value, ArgumentsBundle>
    • SlidingProactiveExpirationPolicy

Constructors

constructor

Accessors

idle

  • get idle(): boolean
  • Check whether GC is idle.

    Returns boolean

size

  • get size(): number
  • Get the number of tracked for expiration keys.

    Returns number

Methods

onClear

  • onClear(): void
  • inheritdoc

    Returns void

onDelete

  • onDelete(entry: ExpirableSlidingCacheEntry<Key, Value>): void
  • inheritdoc

    Parameters

    • entry: ExpirableSlidingCacheEntry<Key, Value>

    Returns void

onHit

  • onHit(entry: ExpirableSlidingCacheEntry<Key, Value>): EntryValidity
  • inheritdoc

    Parameters

    • entry: ExpirableSlidingCacheEntry<Key, Value>

    Returns EntryValidity

onMiss

  • onMiss(): void
  • inheritdoc

    Returns void

onSet

  • onSet(entry: ExpirableSlidingCacheEntry<Key, Value>, options?: ArgumentsBundle): void
  • inheritdoc

    Parameters

    • entry: ExpirableSlidingCacheEntry<Key, Value>
    • Optional options: ArgumentsBundle

    Returns void

onUpdate

  • onUpdate(entry: ExpirableSlidingCacheEntry<Key, Value>, options?: ArgumentsBundle): void
  • inheritdoc

    Parameters

    • entry: ExpirableSlidingCacheEntry<Key, Value>
    • Optional options: ArgumentsBundle

    Returns void

setDeleter

  • setDeleter(deleter: Deleter<Key, Value>): void
  • inheritdoc

    Parameters

    Returns void