CacheAdapter
Hierarchy
- CacheAdapter
Implemented by
Index
Methods
clear
Returns void | Promise<void>
optionalclose
Called inside
MikroORM.close()
Allows graceful shutdowns (e.g. for redis).Returns void | Promise<void>
get
Gets the items under
name
key from the cache.Parameters
name: string
Returns undefined | T | Promise<undefined | T>
remove
Removes the item from cache.
Parameters
name: string
Returns void | Promise<void>
set
Sets the item to the cache.
origin
is used for cache invalidation and should reflect the change in data.Parameters
name: string
data: any
origin: string
optionalexpiration: number
Returns void | Promise<void>
Clears all items stored in the cache.