cache

@nishans/endpoints / Exports / Cache

Class: Cache#

Hierarchy#

Index#

Constructors#

Properties#

Methods#

Constructors#

constructor#

+ new Cache(__namedParameters: Pick<CtorArgs, token | interval | user_id | cache>): Cache

Parameters:#

NameType
__namedParametersPick<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:#

NameType
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:#

NameType
idstring
typeblock | 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:#

NameType
idsUpdateCacheManuallyParam

Returns: UpdateCacheManuallyParam

Defined in: src/Cache.ts:60


saveToCache#

â–¸ saveToCache(recordMap: Partial<RecordMap>): void

Save the passed recordMap to cache

Parameters:#

NameTypeDescription
recordMapPartial<RecordMap>RecordMap map to save to cache

Returns: void

Defined in: src/Cache.ts:51


updateCacheIfNotPresent#

â–¸ updateCacheIfNotPresent(arg: UpdateCacheManuallyParam): Promise<void>

Parameters:#

NameType
argUpdateCacheManuallyParam

Returns: Promise<void>

Defined in: src/Cache.ts:96


updateCacheManually#

â–¸ updateCacheManually(arg: string | UpdateCacheManuallyParam): Promise<void>

Parameters:#

NameType
argstring | UpdateCacheManuallyParam

Returns: Promise<void>

Defined in: src/Cache.ts:82