> **Experimental**
>
> `@aws-cdk/aws-elasticache-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# ServerlessCacheProps

Properties for defining a ServerlessCache.

Extends: ServerlessCacheProps
Used as props by: ServerlessCache

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/serverless-cache.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-elasticache-alpha/lib/serverless-cache.ts#L108)

## Example

```ts
declare const vpc: ec2.Vpc;

const serverlessCache = new elasticache.ServerlessCache(this, 'ServerlessCache', {
  engine: elasticache.CacheEngine.VALKEY_LATEST,
  backup: {
    // set a backup name before deleting a cache
    backupNameBeforeDeletion: "my-final-backup-name",
  },
  vpc,
});
```

## Properties

- `backup`: [BackupSettings](/cdk/api/v2/docs/@aws-cdk_aws-elasticache-alpha.BackupSettings.html) — Backup configuration.

  **Default:** No backups configured

- `cacheUsageLimits`: [CacheUsageLimitsProperty](/cdk/api/v2/docs/@aws-cdk_aws-elasticache-alpha.CacheUsageLimitsProperty.html) — Usage limits for the cache.

  **Default:** No usage limits

- `description`: string — A description for the cache.

  **Default:** No description

- `engine`: [CacheEngine](/cdk/api/v2/docs/@aws-cdk_aws-elasticache-alpha.CacheEngine.html) — The cache engine combined with the version Enum options: VALKEY_DEFAULT, VALKEY_7, VALKEY_8, REDIS_DEFAULT, MEMCACHED_DEFAULT The default options bring the latest versions available.

  **Default:** when not provided, the default engine would be Valkey, latest version available (VALKEY_DEFAULT)

- `kmsKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — KMS key for encryption.

  **Default:** Service managed encryption (AWS owned KMS key)

- `securityGroups`: [ISecurityGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISecurityGroup.html)[] — Security groups for the cache.

  **Default:** A new security group is created

- `serverlessCacheName`: string — Name for the serverless cache.

  **Default:** automatically generated name by Resource

- `userGroup`: [IUserGroup](/cdk/api/v2/docs/@aws-cdk_aws-elasticache-alpha.IUserGroup.html) — User group for access control.

  **Default:** No user group

- `vpc`: [IVpc](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) (required) — The VPC to place the cache in.

- `vpcSubnets`: [SubnetSelection](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) — Which subnets to place the cache in.

  **Default:** Private subnets with egress
