Class: AWSCDK::CodeBuild::BucketCacheOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_build/bucket_cache_options.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cache_namespace: nil, prefix: nil) ⇒ BucketCacheOptions

Returns a new instance of BucketCacheOptions.

Parameters:

  • cache_namespace (String, nil) (defaults to: nil)

    Defines the scope of the cache.

  • prefix (String, nil) (defaults to: nil)

    The prefix to use to store the cache in the bucket.



8
9
10
11
12
13
# File 'code_build/bucket_cache_options.rb', line 8

def initialize(cache_namespace: nil, prefix: nil)
  @cache_namespace = cache_namespace
  Jsii::Type.check_type(@cache_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cacheNamespace") unless @cache_namespace.nil?
  @prefix = prefix
  Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil?
end

Instance Attribute Details

#cache_namespaceString? (readonly)

Note:

Default: undefined - No cache namespace, which means that the cache is not shared across multiple projects.

Defines the scope of the cache.

You can use this namespace to share a cache across multiple projects.



22
23
24
# File 'code_build/bucket_cache_options.rb', line 22

def cache_namespace
  @cache_namespace
end

#prefixString? (readonly)

The prefix to use to store the cache in the bucket.

Returns:

  • (String, nil)


26
27
28
# File 'code_build/bucket_cache_options.rb', line 26

def prefix
  @prefix
end

Class Method Details

.jsii_propertiesObject



28
29
30
31
32
33
# File 'code_build/bucket_cache_options.rb', line 28

def self.jsii_properties
  {
    :cache_namespace => "cacheNamespace",
    :prefix => "prefix",
  }
end

Instance Method Details

#to_jsiiObject



35
36
37
38
39
40
41
42
# File 'code_build/bucket_cache_options.rb', line 35

def to_jsii
  result = {}
  result.merge!({
    "cacheNamespace" => @cache_namespace,
    "prefix" => @prefix,
  })
  result.compact
end