EntityOptions

EntityOptions

Package: @vendure/core File: vendure-config.ts
v1.3.0

Options relating to the internal handling of entities.

Signature

interface EntityOptions {
  entityIdStrategy?: EntityIdStrategy<any>;
  channelCacheTtl?: number;
  zoneCacheTtl?: number;
}

Members

entityIdStrategy

property
v1.3.0
type:
EntityIdStrategy<any>
Defines the strategy used for both storing the primary keys of entities in the database, and the encoding & decoding of those ids when exposing entities via the API. The default uses a simple auto-increment integer strategy.

channelCacheTtl

property
v1.3.0
type:
number
default:
30000
Channels get cached in-memory as they are accessed very frequently. This setting determines how long the cache lives (in ms) until it is considered stale and refreshed. For multi-instance deployments (e.g. serverless, load-balanced), a smaller value here will prevent data inconsistencies between instances.

zoneCacheTtl

property
v1.3.0
type:
number
default:
30000
Zones get cached in-memory as they are accessed very frequently. This setting determines how long the cache lives (in ms) until it is considered stale and refreshed. For multi-instance deployments (e.g. serverless, load-balanced), a smaller value here will prevent data inconsistencies between instances.