Skip to content

Cache

Caching is vital, the higher the cache HIT percentage, the more effectively resources can be scaled towards application availability.

Skpr uses CloudFront cache policies for its caching layer to provide the best performance for your applications.

Configuration

Skpr provisions a CloudFront distribution for each environment. With the use of CloudFront Cache Policies we manage, we can automatically and seamlessly keep all skpr-managed projects up to date and syncronised between environments.

Cache Policies will be not automatically be set, so you may configure projects to opt-in to managed cache policies like this:

# .skpr/defaults.yaml
ingress:
  cache:
    # Which cache policy for the application to utilise.
    policy: drupal

Policies

"all" "drupal"
Cookies all whitelist
SESS*
SSESS*
Query Strings all all
Headers all whitelist
Accept
Authorization
CloudFront-Forwarded-Proto
Host
Default TTL 86400 86400
Minimum TTL 1 1
Maximum TTL 86400 86400
Brotli true true
Gzip true true

Purging

Developers are able to purge the caches when they feel there are immediate updates which need to be rolled out.

List all purge requests

skpr purge dev

Request to clear all paths

skpr purge dev '/*'

Request to clear specific paths

skpr purge dev '/foo' '/bar'
Back to top