GCP.Memcache reference
GetInstance
Section titled “GetInstance”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.
GetInstance: Observing Instances
Section titled “GetInstance: Observing Instances”const getInstance = yield* GCP.Memcache.GetInstance(cache);const live = yield* getInstance();GetInstanceHttp
Section titled “GetInstanceHttp”Source:
src/GCP/Memcache/GetInstanceHttp.tsKind: Layer · Provides:GCP.Memcache.GetInstance
HTTP implementation of GetInstance.
Instance
Section titled “Instance”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.
Instance: Creating an Instance
Section titled “Instance: Creating an Instance”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 },});Instance: Scaling Nodes
Section titled “Instance: Scaling Nodes”const cache = yield* GCP.Memcache.Instance("Cache", { nodeCount: 2, nodeConfig: { cpuCount: 1, memorySizeMb: 1024 },});