Skip to content

AIDC Toolkit / GS1 / GCPLengthCache

Abstract Class: GCPLengthCache ​

Defined in: src/gcp-length-cache.ts:24

GS1 Company Prefix length cache.

Extends ​

Extended by ​

Properties ​

APP_DATA_STORAGE_KEY ​

static APP_DATA_STORAGE_KEY: string = "gcp-length"

Defined in: src/gcp-length-cache.ts:28

Storage key for full application data object.


NEXT_CHECK_DATE_TIME_STORAGE_KEY ​

static NEXT_CHECK_DATE_TIME_STORAGE_KEY: string = "gcp-length-next-check-date-time"

Defined in: src/gcp-length-cache.ts:33

Storage key for next check date/time.


HEADER_STORAGE_KEY ​

static HEADER_STORAGE_KEY: string = "gcp-length-header"

Defined in: src/gcp-length-cache.ts:38

Storage key for header information (date/time and disclaimer).


DATA_STORAGE_KEY ​

static DATA_STORAGE_KEY: string = "gcp-length-data"

Defined in: src/gcp-length-cache.ts:43

Storage key for data only.

Constructors ​

Constructor ​

new GCPLengthCache(appDataStorage): GCPLengthCache

Defined in: src/gcp-length-cache.ts:61

Constructor.

Parameters ​

appDataStorage ​

AppDataStorage<boolean>

Application data storage.

Returns ​

GCPLengthCache

Overrides ​

Cache<GCPLengthData, GCPLengthData | GCPLengthSourceJSON>.constructor

Accessors ​

appDataStorage ​

Get Signature ​

get appDataStorage(): AppDataStorage<boolean>

Defined in: src/gcp-length-cache.ts:70

Get the application data storage.

Returns ​

AppDataStorage<boolean>


nextCheckDateTime ​

Get Signature ​

get nextCheckDateTime(): Promise<Date | undefined>

Defined in: src/gcp-length-cache.ts:120

Inherit Doc ​
Returns ​

Promise<Date | undefined>

Overrides ​

Cache.nextCheckDateTime


cacheDateTime ​

Get Signature ​

get cacheDateTime(): Promise<Date | undefined>

Defined in: src/gcp-length-cache.ts:127

Inherit Doc ​
Returns ​

Promise<Date | undefined>

Overrides ​

Cache.cacheDateTime


cacheData ​

Get Signature ​

get cacheData(): Promise<GCPLengthData>

Defined in: src/gcp-length-cache.ts:134

Inherit Doc ​
Returns ​

Promise<GCPLengthData>

Overrides ​

Cache.cacheData


sourceDateTime ​

Get Signature ​

get abstract sourceDateTime(): Promisable<Date>

Defined in: node_modules/@aidc-toolkit/core/dist/index.d.ts:678

Get the date/time at which the source was last updated. This should not be called unless the next check date/time has passed, as it may trigger an expensive remote retrieval.

Returns ​

Promisable<Date>

Inherited from ​

Cache.sourceDateTime


sourceData ​

Get Signature ​

get abstract sourceData(): Promisable<TSource>

Defined in: node_modules/@aidc-toolkit/core/dist/index.d.ts:683

Get the source data. This should not be called unless the next check date/time has passed, as it may trigger an expensive remote retrieval.

Returns ​

Promisable<TSource>

Inherited from ​

Cache.sourceData

Methods ​

update() ​

update(nextCheckDateTime, _cacheDateTime?, cacheData?): Promise<void>

Defined in: src/gcp-length-cache.ts:148

Parameters ​

nextCheckDateTime ​

Date

_cacheDateTime? ​

Date

cacheData? ​

GCPLengthData

Returns ​

Promise<void>

Inherit Doc ​

Overrides ​

Cache.update