Class CmsObjectCacheConfiguration
java.lang.Object
com.cloudforgeci.api.core.topology.CmsObjectCacheConfiguration
ElastiCache Redis/Memcached configuration for CMS object caching.
Creates ElastiCache clusters with appropriate configuration for CMS object caching, session storage, and page caching.
Features:
- Redis or Memcached clusters
- Subnet group in VPC private subnets
- Security group integration
- AUTH password via Secrets Manager
- In-transit encryption (TLS)
- At-rest encryption for production
- Since:
- 3.1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic software.amazon.awscdk.services.elasticache.CfnCacheClustercreateMemcachedCluster(SystemContext ctx, ApplicationSpec spec) Create ElastiCache Memcached cluster.createMemcachedEnvironment(String endpoint, int port, CmsSpec spec) Create environment variables for Memcached connection.static software.amazon.awscdk.services.elasticache.CfnCacheClustercreateRedisCluster(SystemContext ctx, ApplicationSpec spec) Create ElastiCache Redis cluster for object caching (or, for non-CMS callers such asCloudForgeManagerApplicationSpec, a Redis-backed session store).createRedisEnvironment(String endpoint, int port, CmsSpec spec) Create environment variables for Redis connection.static software.amazon.awscdk.services.elasticache.CfnReplicationGroupcreateRedisReplicationGroup(SystemContext ctx, ApplicationSpec spec, int numReplicas) Create ElastiCache Redis replication group for high availability.
-
Method Details
-
createRedisCluster
public static software.amazon.awscdk.services.elasticache.CfnCacheCluster createRedisCluster(SystemContext ctx, ApplicationSpec spec) Create ElastiCache Redis cluster for object caching (or, for non-CMS callers such asCloudForgeManagerApplicationSpec, a Redis-backed session store).Only
ApplicationSpec.applicationId()/ApplicationSpec.displayName()are used, so anyApplicationSpecworks here —CmsSpecextends it and remains a valid argument unchanged.- Parameters:
ctx- the SystemContextspec- the application specification- Returns:
- Redis cache cluster
-
createRedisReplicationGroup
public static software.amazon.awscdk.services.elasticache.CfnReplicationGroup createRedisReplicationGroup(SystemContext ctx, ApplicationSpec spec, int numReplicas) Create ElastiCache Redis replication group for high availability.Creates a Redis replication group with:
- Primary node + read replicas
- Automatic failover
- Multi-AZ deployment
- In-transit and at-rest encryption
- Parameters:
ctx- the SystemContextspec- the application specificationnumReplicas- number of read replicas (0-5 — 0 is a valid, supported single-node/no- failover configuration, seeautomaticFailoverEnabled(numReplicas > 0)below; 5 is ElastiCache's own hard ceiling of 6 total nodes per replication group)- Returns:
- Redis replication group
- Throws:
IllegalArgumentException- if numReplicas is outside 0-5
-
createMemcachedCluster
public static software.amazon.awscdk.services.elasticache.CfnCacheCluster createMemcachedCluster(SystemContext ctx, ApplicationSpec spec) Create ElastiCache Memcached cluster.- Parameters:
ctx- the SystemContextspec- the application specification- Returns:
- Memcached cache cluster
-
createRedisEnvironment
-
createMemcachedEnvironment
public static Map<String,String> createMemcachedEnvironment(String endpoint, int port, CmsSpec spec) Create environment variables for Memcached connection.- Parameters:
endpoint- Memcached configuration endpointport- Memcached portspec- the CMS specification- Returns:
- map of environment variables
-