Skip to content

EndpointCache

EndpointCache is a caching mechanism designed to store data temporarily with an expiration time.

Properties

expiry

EndpointCache.expiry  :: number

Methods

setExpiry

EndpointCache : setExpiry (

     seconds: number
)  -> ()

Sets the expiry time for the cache.

set

EndpointCache : set (

     value: any
)  -> ()

Sets the value in the cache and starts the expiry timer.

get

EndpointCache : get ()  -> any

Gets the current value from the cache.

Functions

new

EndpointCache . new (

     expiryTime: number?
)  -> ()

Creates a new instance of EndpointCache.