Skip to content

AIDC Toolkit / GS1 / GCPLengthCache

Abstract Class: GCPLengthCache ​

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

GS1 Company Prefix length cache.

Extends ​

Extended by ​

Constructors ​

Constructor ​

new GCPLengthCache(): GCPLengthCache

Returns ​

GCPLengthCache

Inherited from ​

Cache.constructor

Accessors ​

nextCheckDateTime ​

Get Signature ​

get abstract nextCheckDateTime(): Promisable<Date | undefined>

Defined in: node_modules/@aidc-toolkit/core/dist/cache.d.ts:16

Get the date/time at or after which the source should be checked for updates. If the value is undefined, this is the first usage.

Returns ​

Promisable<Date | undefined>

Inherited from ​

Cache.nextCheckDateTime


cacheDateTime ​

Get Signature ​

get abstract cacheDateTime(): Promisable<Date | undefined>

Defined in: node_modules/@aidc-toolkit/core/dist/cache.d.ts:21

Get the date/time at which the cache was last updated. This may more accurately reflect the date/time at which the last source retrieved was updated. If the value is undefined, there is no data in the cache.

Returns ​

Promisable<Date | undefined>

Inherited from ​

Cache.cacheDateTime


cacheData ​

Get Signature ​

get abstract cacheData(): Promisable<TCache>

Defined in: node_modules/@aidc-toolkit/core/dist/cache.d.ts:25

Get the cache data. This should only ever be called if the cache date/time is defined.

Returns ​

Promisable<TCache>

Inherited from ​

Cache.cacheData


sourceDateTime ​

Get Signature ​

get abstract sourceDateTime(): Promisable<Date>

Defined in: node_modules/@aidc-toolkit/core/dist/cache.d.ts:30

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/cache.d.ts:35

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() ​

Call Signature ​

abstract update(nextCheckDateTime): Promisable<void>

Defined in: node_modules/@aidc-toolkit/core/dist/cache.d.ts:43

Update the cache with only the next check date/time. The cache date/time and cache data must not be modified. This is typically called when the cache is up to date with the source or source retrieval has failed.

Parameters ​
nextCheckDateTime ​

Date

Next check date/time.

Returns ​

Promisable<void>

Inherited from ​

Cache.update

Call Signature ​

abstract update(nextCheckDateTime, cacheDateTime, cacheData): Promisable<void>

Defined in: node_modules/@aidc-toolkit/core/dist/cache.d.ts:56

Update all cache parameters. This is typically called when the cache is updated from the source.

Parameters ​
nextCheckDateTime ​

Date

Next check date/time.

cacheDateTime ​

Date

Cache date/time.

cacheData ​

GCPLengthData

Cache data.

Returns ​

Promisable<void>

Inherited from ​

Cache.update