Cache Server Endpoints
Cache servers provide serverless ElastiCache instances in AWS. GatewaysApp supports Valkey, Memcached, and Redis OSS engines with automatic security group and subnet management.Create Cache Server
POST /api/:projectSlug/:environmentSlug/cache-servers- Create a new serverless ElastiCache cache in AWS
- Automatic security group assignment (uses default security group for project/environment)
- Support for Valkey, Memcached, and Redis OSS engines
- Serverless architecture (automatic scaling)
- Configurable engine version
- Cache name will be sanitized to meet AWS requirements (1-40 characters, alphanumeric and hyphens only)
- Automatically converted to lowercase
- Invalid characters replaced with hyphens
- Must contain at least one alphanumeric character
- The sanitized name is used directly as the AWS serverless cache name
valkey- Valkey (Redis fork, default port: 6379)memcached- Memcached (default port: 11211)redis- Redis OSS (default port: 6379)
:projectSlug with your project slug. Requires authentication. Returns versions by provider: AWS ElastiCache (redis, valkey, memcached); GCP Memorystore (redis and memcached only, no Valkey); Azure Cache for Redis (redis only). Run npm run fetch-cache-engine-versions for AWS and npm run fetch-gcp-cache-engine-versions for GCP. See Cloud Infrastructure API Documentation for details.
Querying Provisioned Cache Instance Types (Azure, GCP):
For Azure and GCP (provisioned caches, no serverless), also use the cache instance types API to list tiers (e.g. Basic C0, Standard C1, M1):
cache-versions response includes provisionedInstanceTypesAvailable and cacheInstanceTypesEndpoint when the provider is Azure or GCP. Run npm run seed:cache-instance-types to populate data, then npm run fetch-cache-instance-pricing to fill price_per_hour (Azure: Retail API; GCP: reference rates). See Cloud Infrastructure API – Get Cache Instance Types for full details.
Important Notes:
- Cache servers are created as serverless (automatic scaling, no infrastructure management)
- Cache creation can take several minutes to complete
- The API returns immediately with status “creating”
- Use the sync endpoint or AWS Console to check creation progress
- Default security groups are automatically created and reused per project/environment
- Serverless caches automatically scale based on usage
List Cache Servers
GET /api/:projectSlug/:environmentSlug/cache-servers- List all cache servers for a project environment
- None (filtering is handled by project/environment slugs in the path)
Get Cache Server Details
GET /api/:projectSlug/:environmentSlug/cache-servers/:id- Get details of a specific cache server
id- Cache server database ID (not AWS resource ID)
Sync Cache Server Status from Cloud Provider
Note: Cache server sync is now performed through the unified resources API. Use the unified sync endpoint instead of the type-specific endpoint. Unified Sync Endpoint:PUT /api/:projectSlug/:environmentSlug/resources/:resourceId/sync
See Resources API — Sync Resource from Cloud Provider for details.
Description:
- Fetches the latest cache server details from the cloud provider (AWS ElastiCache Serverless, GCP Memorystore Redis, or Azure Cache for Redis)
- Updates the cache server record with current status, endpoint, port, and engine version
- Useful for checking creation progress or refreshing cache server information
Delete Cache Server
Cache server deletion is performed only via the unified resources API:DELETE /api/:projectSlug/:environmentSlug/resources/:resourceId
Cache Server Connection
Once a cache server is created and its status becomesavailable, you can connect to it using:
- Endpoint: The
endpointfield in the cache server response - Port: The
portfield (6379 for Redis/Valkey, 11211 for Memcached)
Cache Server in Unified Resources API
Cache servers are also included in the unified resources API endpoints:List All Resources (includes cache servers)
GET /api/:projectSlug/:environmentSlug/resources- See Resources API DocumentationGET /api/:projectSlug/:environmentSlug/resources- See Resources API Documentation
Get Cache Server via Resources API
GET /api/:projectSlug/:environmentSlug/resources/cache_server/:id- Get cache server details via unified resources API
Cache Server Status Values
Cache servers can have the following status values:creating- Cache server is being created in AWSavailable- Cache server is available and ready to usemodifying- Cache server is being modifieddeleting- Cache server is being deleteddeleted- Cache server has been deleted (marked in database)- Other AWS-specific status values may also appear
Cache Engine Details
Valkey
- Description: Open-source fork of Redis, compatible with Redis commands
- Default Port: 6379
- Use Cases: Session storage, caching, real-time analytics
- Compatibility: Redis protocol compatible
Redis OSS
- Description: Open-source Redis (Redis Open Source)
- Default Port: 6379
- Use Cases: Session storage, caching, pub/sub messaging
- Compatibility: Full Redis command set
Memcached
- Description: High-performance distributed memory caching system
- Default Port: 11211
- Use Cases: Simple key-value caching, session storage
- Compatibility: Memcached protocol
Resource Connections
Cache servers can be connected to other resources via the Resource Connections API:- Applications can connect to cache servers for caching functionality
- Instances/servers can connect to cache servers for data caching