Class: Google::Apis::ComputeAlpha::CacheKeyPolicy

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb

Overview

Message containing what to include in the cache key for a request for Cloud CDN.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CacheKeyPolicy

Returns a new instance of CacheKeyPolicy.



5910
5911
5912
# File 'lib/google/apis/compute_alpha/classes.rb', line 5910

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#include_hostBoolean Also known as: include_host?

If true, requests to different hosts will be cached separately. Corresponds to the JSON property includeHost

Returns:

  • (Boolean)


5865
5866
5867
# File 'lib/google/apis/compute_alpha/classes.rb', line 5865

def include_host
  @include_host
end

#include_http_headersArray<String>

Allows HTTP request headers (by name) to be used in the cache key. Corresponds to the JSON property includeHttpHeaders

Returns:

  • (Array<String>)


5871
5872
5873
# File 'lib/google/apis/compute_alpha/classes.rb', line 5871

def include_http_headers
  @include_http_headers
end

#include_named_cookiesArray<String>

Allows HTTP cookies (by name) to be used in the cache key. The name=value pair will be used in the cache key Cloud CDN generates. Corresponds to the JSON property includeNamedCookies

Returns:

  • (Array<String>)


5877
5878
5879
# File 'lib/google/apis/compute_alpha/classes.rb', line 5877

def include_named_cookies
  @include_named_cookies
end

#include_protocolBoolean Also known as: include_protocol?

If true, http and https requests will be cached separately. Corresponds to the JSON property includeProtocol

Returns:

  • (Boolean)


5882
5883
5884
# File 'lib/google/apis/compute_alpha/classes.rb', line 5882

def include_protocol
  @include_protocol
end

#include_query_stringBoolean Also known as: include_query_string?

If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. Corresponds to the JSON property includeQueryString

Returns:

  • (Boolean)


5891
5892
5893
# File 'lib/google/apis/compute_alpha/classes.rb', line 5891

def include_query_string
  @include_query_string
end

#query_string_blacklistArray<String>

Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. Corresponds to the JSON property queryStringBlacklist

Returns:

  • (Array<String>)


5900
5901
5902
# File 'lib/google/apis/compute_alpha/classes.rb', line 5900

def query_string_blacklist
  @query_string_blacklist
end

#query_string_whitelistArray<String>

Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. Corresponds to the JSON property queryStringWhitelist

Returns:

  • (Array<String>)


5908
5909
5910
# File 'lib/google/apis/compute_alpha/classes.rb', line 5908

def query_string_whitelist
  @query_string_whitelist
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5915
5916
5917
5918
5919
5920
5921
5922
5923
# File 'lib/google/apis/compute_alpha/classes.rb', line 5915

def update!(**args)
  @include_host = args[:include_host] if args.key?(:include_host)
  @include_http_headers = args[:include_http_headers] if args.key?(:include_http_headers)
  @include_named_cookies = args[:include_named_cookies] if args.key?(:include_named_cookies)
  @include_protocol = args[:include_protocol] if args.key?(:include_protocol)
  @include_query_string = args[:include_query_string] if args.key?(:include_query_string)
  @query_string_blacklist = args[:query_string_blacklist] if args.key?(:query_string_blacklist)
  @query_string_whitelist = args[:query_string_whitelist] if args.key?(:query_string_whitelist)
end