Skip to content

GCP.Memcache reference

Source: src/GCP/Memcache/GetInstance.ts

Runtime binding for Memorystore Memcached instances.get.

Bind this operation to an Instance in a Function/Action init phase. Provide GetInstanceHttp.

const getInstance = yield* GCP.Memcache.GetInstance(cache);
const live = yield* getInstance();

Source: src/GCP/Memcache/GetInstanceHttp.ts Kind: Layer · Provides: GCP.Memcache.GetInstance

HTTP implementation of GetInstance.

Source: src/GCP/Memcache/Instance.ts

A Memorystore for Memcached instance.

Changing instanceId, location, authorizedNetwork, zones, nodeConfig, or reservedIpRangeId replaces the instance. Memcached version upgrades use instances.upgrade; a downgrade replaces the instance.

Provisioning typically takes several minutes.

Generated name, 1 node

const cache = yield* GCP.Memcache.Instance("Cache", {
nodeCount: 1,
nodeConfig: { cpuCount: 1, memorySizeMb: 1024 },
});

Explicit id, labels, and display name

const cache = yield* GCP.Memcache.Instance("Cache", {
instanceId: "app-memcache",
location: "us-central1",
displayName: "app cache",
labels: { env: "prod" },
nodeCount: 1,
nodeConfig: { cpuCount: 1, memorySizeMb: 1024 },
});
const cache = yield* GCP.Memcache.Instance("Cache", {
nodeCount: 2,
nodeConfig: { cpuCount: 1, memorySizeMb: 1024 },
});