Skip to content
v2.275.0

CacheControl Class ​

Used for HTTP cache-control header, which influences downstream caches.

Use the provided static factory methods to construct instances of this class. Used in the S3DeployActionProps.cacheControl property.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline_actions as codepipeline_actions } from 'aws-cdk-lib';
const cacheControl = codepipeline_actions.CacheControl.fromString('s');

Properties ​

valuestringvaluestrvalueStringValuestringValue*string#
the actual text value of the created directive.

Methods ​

fromString(s: string): CacheControl // chainable@staticmethod def from_string(s: str) -> CacheControlpublic static CacheControl fromString(String s)public static CacheControl FromString(string s)func FromString(S *string) CacheControlstatic#
Allows you to create an arbitrary cache control directive, in case our support is missing a method for a particular directive.
immutable(): CacheControl // chainable@staticmethod def immutable() -> CacheControlpublic static CacheControl immutable()public static CacheControl Immutable()func Immutable() CacheControlstatic#
The 'immutable' cache control directive.
maxAge(t: Duration): CacheControl // chainable@staticmethod def max_age(t: Duration) -> CacheControlpublic static CacheControl maxAge(Duration t)public static CacheControl MaxAge(Duration t)func MaxAge(T Duration) CacheControlstatic#
The 'max-age' cache control directive.
mustRevalidate(): CacheControl // chainable@staticmethod def must_revalidate() -> CacheControlpublic static CacheControl mustRevalidate()public static CacheControl MustRevalidate()func MustRevalidate() CacheControlstatic#
The 'must-revalidate' cache control directive.
mustUnderstand(): CacheControl // chainable@staticmethod def must_understand() -> CacheControlpublic static CacheControl mustUnderstand()public static CacheControl MustUnderstand()func MustUnderstand() CacheControlstatic#
The 'must-understand' cache control directive.
noCache(): CacheControl // chainable@staticmethod def no_cache() -> CacheControlpublic static CacheControl noCache()public static CacheControl NoCache()func NoCache() CacheControlstatic#
The 'no-cache' cache control directive.
noStore(): CacheControl // chainable@staticmethod def no_store() -> CacheControlpublic static CacheControl noStore()public static CacheControl NoStore()func NoStore() CacheControlstatic#
The 'no-store' cache control directive.
noTransform(): CacheControl // chainable@staticmethod def no_transform() -> CacheControlpublic static CacheControl noTransform()public static CacheControl NoTransform()func NoTransform() CacheControlstatic#
The 'no-transform' cache control directive.
proxyRevalidate(): CacheControl // chainable@staticmethod def proxy_revalidate() -> CacheControlpublic static CacheControl proxyRevalidate()public static CacheControl ProxyRevalidate()func ProxyRevalidate() CacheControlstatic#
The 'proxy-revalidate' cache control directive.
setPrivate(): CacheControl // chainable@staticmethod def set_private() -> CacheControlpublic static CacheControl setPrivate()public static CacheControl SetPrivate()func SetPrivate() CacheControlstatic#
The 'private' cache control directive.
setPublic(): CacheControl // chainable@staticmethod def set_public() -> CacheControlpublic static CacheControl setPublic()public static CacheControl SetPublic()func SetPublic() CacheControlstatic#
The 'public' cache control directive.
sMaxAge(t: Duration): CacheControl // chainable@staticmethod def s_max_age(t: Duration) -> CacheControlpublic static CacheControl sMaxAge(Duration t)public static CacheControl SMaxAge(Duration t)func SMaxAge(T Duration) CacheControlstatic#
The 's-max-age' cache control directive.
staleIfError(t: Duration): CacheControl // chainable@staticmethod def stale_if_error(t: Duration) -> CacheControlpublic static CacheControl staleIfError(Duration t)public static CacheControl StaleIfError(Duration t)func StaleIfError(T Duration) CacheControlstatic#
The 'stale-if-error' cache control directive.
staleWhileRevalidate(t: Duration): CacheControl // chainable@staticmethod def stale_while_revalidate(t: Duration) -> CacheControlpublic static CacheControl staleWhileRevalidate(Duration t)public static CacheControl StaleWhileRevalidate(Duration t)func StaleWhileRevalidate(T Duration) CacheControlstatic#
The 'stale-while-revalidate' cache control directive.