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 the CloudFront Cache Policies that we manage, we can automatically and seamlessly keep all Skpr-managed projects up to date and synchronised between environments.
Cache Policies are set by default and selected based on the project type. See below.
Policies
Minimal | Basic | FPM | Drupal | |
---|---|---|---|---|
Cookies | none | none | none | SESS SSESS |
Query Strings | all | all | all | all |
Headers | none | Accept Authorization CloudFront-Forwarded-Proto Host |
Accept Authorization CloudFront-Forwarded-Proto Host |
Accept Authorization CloudFront-Forwarded-Proto Host X-Drupal-EntityPreview-CSRF-Token X-Drupal-MediaPreview-CSRF-Token X-Drupal-Quickedit-CSRF-Token X-Drupal-EmbedPreview-CSRF-Token X-CSRF-Token |
Default TTL | 86400 | 86400 | 86400 | 86400 |
Minimum TTL | 1 | 1 | 1 | 1 |
Maximum TTL | 86400 | 86400 | 86400 | 86400 |
Brotli | true | true | true | true |
Gzip | true | true | 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'
Custom Cache Policy
The Skpr platform team can create additional Cache Policies to suite your needs.
Cache Policies can then be overriden using the following configuration.
ingress:
cache:
policy: custom-cache-policy