Interface BucketCacheOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
BucketCacheOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-08-06T18:14:34.207Z") @Stability(Stable) public interface BucketCacheOptions extends software.amazon.jsii.JsiiSerializable
Example:

 Bucket sourceBucket;
 Bucket myCachingBucket;
 Project.Builder.create(this, "ProjectA")
         .source(Source.s3(S3SourceProps.builder()
                 .bucket(sourceBucket)
                 .path("path/to/source-a.zip")
                 .build()))
         // configure the same bucket and path prefix
         .cache(Cache.bucket(myCachingBucket, BucketCacheOptions.builder()
                 .prefix("cache")
                 // use the same cache namespace
                 .cacheNamespace("cache-namespace")
                 .build()))
         .buildSpec(BuildSpec.fromObject(Map.of(
                 "version", "0.2",
                 "phases", Map.of(
                         "build", Map.of(
                                 "commands", List.of("..."))),
                 // specify the same cache key and paths
                 "cache", Map.of(
                         "key", "unique-key",
                         "paths", List.of("/root/cachedir/**/*")))))
         .build();
 Project.Builder.create(this, "ProjectB")
         .source(Source.s3(S3SourceProps.builder()
                 .bucket(sourceBucket)
                 .path("path/to/source-b.zip")
                 .build()))
         // configure the same bucket and path prefix
         .cache(Cache.bucket(myCachingBucket, BucketCacheOptions.builder()
                 .prefix("cache")
                 // use the same cache namespace
                 .cacheNamespace("cache-namespace")
                 .build()))
         .buildSpec(BuildSpec.fromObject(Map.of(
                 "version", "0.2",
                 "phases", Map.of(
                         "build", Map.of(
                                 "commands", List.of("..."))),
                 // specify the same cache key and paths
                 "cache", Map.of(
                         "key", "unique-key",
                         "paths", List.of("/root/cachedir/**/*")))))
         .build();