Skip to content

Documentation


Documentation / @blazetrails/actionpack / AbstractController / Fragments

Variable: Fragments ​

const Fragments: { ClassMethods: { fragmentCacheKey: (this, value, key?) => void; }; combinedFragmentCacheKey: (this, key) => unknown[]; expireFragment: (this, key, options?) => Promise<unknown>; fragmentExist: (this, key, options?) => Promise<boolean | null | undefined>; instrumentFragmentCache: <T>(this, name, key, block) => T; readFragment: (this, key, options?) => Promise<unknown>; writeFragment: (this, key, content, options?) => Promise<unknown>; }

Defined in: packages/actionpack/lib/abstract-controller/caching/fragments.ts:43

Type Declaration ​

ClassMethods ​

ClassMethods: { fragmentCacheKey: (this, value, key?) => void; }

ClassMethods.fragmentCacheKey ​

fragmentCacheKey: (this, value, key?) => void

Parameters ​
ParameterTypeDefault value
thisFragmentsClassMethodsundefined
valueunknownnull
key?FragmentCacheKeyBlockundefined
Returns ​

void

combinedFragmentCacheKey ​

combinedFragmentCacheKey: (this, key) => unknown[]

Parameters ​

ParameterType
thisFragmentsHost
keyunknown

Returns ​

unknown[]

expireFragment ​

expireFragment: (this, key, options?) => Promise<unknown>

Parameters ​

ParameterType
thisFragmentsHost
keyunknown
options?CacheOptions

Returns ​

Promise<unknown>

fragmentExist ​

fragmentExist: (this, key, options?) => Promise<boolean | null | undefined>

Parameters ​

ParameterType
thisFragmentsHost
keyunknown
options?CacheOptions

Returns ​

Promise<boolean | null | undefined>

instrumentFragmentCache ​

instrumentFragmentCache: <T>(this, name, key, block) => T

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
thisFragmentsHost
namestring
keyunknown
block() => T

Returns ​

T

readFragment ​

readFragment: (this, key, options?) => Promise<unknown>

Parameters ​

ParameterType
thisFragmentsHost
keyunknown
options?CacheOptions

Returns ​

Promise<unknown>

writeFragment ​

writeFragment: (this, key, content, options?) => Promise<unknown>

Parameters ​

ParameterType
thisFragmentsHost
keyunknown
contentunknown
options?CacheOptions

Returns ​

Promise<unknown>