cache
@nishans/endpoints / Exports / Cache
#
Class: Cache#
HierarchyCache
↳ Queries
#
Index#
Constructors#
Properties#
Methods- getConfigs
- initializeCache
- initializeCacheForSpecificData
- returnNonCachedData
- saveToCache
- updateCacheIfNotPresent
- updateCacheManually
#
Constructors#
constructor+ new Cache(__namedParameters
: Pick<CtorArgs, token | interval | user_id | cache>): Cache
#
Parameters:Name | Type |
---|---|
__namedParameters | Pick<CtorArgs, token | interval | user_id | cache> |
Returns: Cache
Defined in: src/Cache.ts:15
#
Properties#
cache• cache: ICache
Defined in: src/Cache.ts:6
#
headers• headers: { headers
: { cookie
: string ; x-notion-active-user-header
: string } }
#
Type declaration:Name | Type |
---|---|
headers | { cookie : string ; x-notion-active-user-header : string } |
Defined in: src/Cache.ts:9
#
interval• interval: number
Defined in: src/Cache.ts:8
#
token• token: string
Defined in: src/Cache.ts:7
#
user_id• user_id: string
Defined in: src/Cache.ts:15
#
Methods#
getConfigsâ–¸ getConfigs(): Configs
Returns: Configs
Defined in: src/Cache.ts:39
#
initializeCacheâ–¸ initializeCache(): Promise<void>
Returns: Promise<void>
Defined in: src/Cache.ts:66
#
initializeCacheForSpecificDataâ–¸ initializeCacheForSpecificData(id
: string, type
: block | collection | collection_view | space | notion_user | space_view | user_root | user_settings): Promise<void>
#
Parameters:Name | Type |
---|---|
id | string |
type | block | collection | collection_view | space | notion_user | space_view | user_root | user_settings |
Returns: Promise<void>
Defined in: src/Cache.ts:110
#
returnNonCachedDataâ–¸ returnNonCachedData(ids
: UpdateCacheManuallyParam): UpdateCacheManuallyParam
#
Parameters:Name | Type |
---|---|
ids | UpdateCacheManuallyParam |
Returns: UpdateCacheManuallyParam
Defined in: src/Cache.ts:60
#
saveToCacheâ–¸ saveToCache(recordMap
: Partial<RecordMap>): void
Save the passed recordMap to cache
#
Parameters:Name | Type | Description |
---|---|---|
recordMap | Partial<RecordMap> | RecordMap map to save to cache |
Returns: void
Defined in: src/Cache.ts:51
#
updateCacheIfNotPresentâ–¸ updateCacheIfNotPresent(arg
: UpdateCacheManuallyParam): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateCacheManuallyParam |
Returns: Promise<void>
Defined in: src/Cache.ts:96
#
updateCacheManuallyâ–¸ updateCacheManually(arg
: string | UpdateCacheManuallyParam): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | string | UpdateCacheManuallyParam |
Returns: Promise<void>
Defined in: src/Cache.ts:82