Struct google_api_proto::google::cloud::compute::v1::CacheKeyPolicy
source · pub struct CacheKeyPolicy {
pub include_host: Option<bool>,
pub include_http_headers: Vec<String>,
pub include_named_cookies: Vec<String>,
pub include_protocol: Option<bool>,
pub include_query_string: Option<bool>,
pub query_string_blacklist: Vec<String>,
pub query_string_whitelist: Vec<String>,
}
Expand description
Message containing what to include in the cache key for a request for Cloud CDN.
Fields§
§include_host: Option<bool>
If true, requests to different hosts will be cached separately.
include_http_headers: Vec<String>
Allows HTTP request headers (by name) to be used in the cache key.
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.
include_protocol: Option<bool>
If true, http and https requests will be cached separately.
include_query_string: Option<bool>
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.
query_string_blacklist: Vec<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.
query_string_whitelist: Vec<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.
Implementations§
source§impl CacheKeyPolicy
impl CacheKeyPolicy
sourcepub fn include_protocol(&self) -> bool
pub fn include_protocol(&self) -> bool
Returns the value of include_protocol
, or the default value if include_protocol
is unset.
sourcepub fn include_query_string(&self) -> bool
pub fn include_query_string(&self) -> bool
Returns the value of include_query_string
, or the default value if include_query_string
is unset.
sourcepub fn include_host(&self) -> bool
pub fn include_host(&self) -> bool
Returns the value of include_host
, or the default value if include_host
is unset.
Trait Implementations§
source§impl Clone for CacheKeyPolicy
impl Clone for CacheKeyPolicy
source§fn clone(&self) -> CacheKeyPolicy
fn clone(&self) -> CacheKeyPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CacheKeyPolicy
impl Debug for CacheKeyPolicy
source§impl Default for CacheKeyPolicy
impl Default for CacheKeyPolicy
source§impl Message for CacheKeyPolicy
impl Message for CacheKeyPolicy
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for CacheKeyPolicy
impl PartialEq for CacheKeyPolicy
source§fn eq(&self, other: &CacheKeyPolicy) -> bool
fn eq(&self, other: &CacheKeyPolicy) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CacheKeyPolicy
Auto Trait Implementations§
impl Freeze for CacheKeyPolicy
impl RefUnwindSafe for CacheKeyPolicy
impl Send for CacheKeyPolicy
impl Sync for CacheKeyPolicy
impl Unpin for CacheKeyPolicy
impl UnwindSafe for CacheKeyPolicy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request