- Preparing search index...
- The search index is not available
@tarpit/http
Constructors
constructor
- new ResponseCache(cache_proxy, scope, expire_secs): ResponseCache
-
Parameters
-
-
scope: string
-
expire_secs: number
Properties
Private
Optional
cache_key
cache_key?: string
Private
expire_secs
expire_secs: number
Private
scope
scope: string
Methods
cache_and_respond
- cache_and_respond<T>(may_be_promised): Promise<never>
-
Type Parameters
-
T extends string | object | Buffer
Parameters
-
may_be_promised: T | Promise<T>
Returns Promise<never>
clear
- clear(key): Promise<void>
-
Returns Promise<void>
get
- get(key): Promise<null | string | object | Buffer>
-
Returns Promise<null | string | object | Buffer>
respond_if_cache
- respond_if_cache(key): Promise<void>
-
Returns Promise<void>
Static
create
- create(cache_proxy, scope?, expire_secs?): ResponseCache
-
Parameters
-
-
Optional
scope: string
-
Optional
expire_secs: number