LogoLogo
BlogHelp CenterPrivacyLoginRegister
  • Let's optimize your images
  • Transformations
    • Input formats
    • Image operations
      • Width and height
      • Prevent enlargement
      • Crop
        • Automatic gravity crop
        • Positionable crop
        • Focal point crop
        • Face crop
        • Face hide
        • Aspect ratio crop
      • Fit
      • Cropfit
      • Bound
      • Boundmin
      • Cover
      • Device pixel ratio
      • Flip
      • Rotate
      • Trim
      • Rounded corners
      • Background removal
    • Image filters
      • Adjustment
        • Brightness
        • Contrast
        • Saturate
      • Color manipulation
        • Color overlay
        • Grayscale
        • Duotone
        • Sepia
        • Invert
      • Blur
      • Pixelate
      • Sharpen
      • Face blur
    • Image watermarking
      • Static watermark
      • Dynamic watermark
      • Text watermark
        • Text watermark fonts
    • Image compression
      • Image formats
      • Optipress
      • SVG compression
      • Color management
    • Static content
      • PDF to image
      • JS/CSS optimization
    • Video operations
  • Setup
    • Shortening URLs
      • Origin URL prefix
      • Aliases
      • Presets
      • Rules
    • Connecting storage bucket
      • Amazon S3
      • Google Cloud Storage
      • Microsoft Azure Blob
      • Basic authentication HTTP
    • Security
      • Token security
        • Domain whitelisting
        • URL signature
        • URL sealing
      • Account security
      • Origin security
  • Implementation
    • URL API implementation
    • Responsive images JS plugin
    • CMS plugins
      • Spryker
      • Drupal
      • Kontent.ai
      • Contentful
      • Adobe Commerce (Magento)
        • Basic implementation
        • Advanced implementation
      • Opencart
      • Prestashop
        • Prestashop tutorial
      • Shopware
      • Sylius
      • Wordpress
      • Shopify tutorial
        • Shopify integration
        • Theme files
        • FAQ
      • Commercetools tutorial
      • Ruby wrapper
    • Migrating from another image CDN
  • Caching and acceleration
    • CDN basics
    • Caching interval
    • Invalidation API
    • Warmup API
  • Analytics
    • Dashboards
      • Overview
      • Volumetry
      • Optimization
      • Delivery
      • Top-Ranking
      • RUM
      • Logs API
  • Cloudimage_v6 EOL
Powered by GitBook
LogoLogo

Resources

  • Help center
  • Contact support
  • Developers
  • cloudimage.io

Solutions

  • Media optimization
  • DAM
  • Performance report

Company

  • Blog
  • Service status
  • About us

Legal stuff

  • Terms & conditions
  • Privacy center
  • DMCA

Copyright © 2023 Scaleflex

On this page
  • Token caching settings
  • Setting default cache
  • Image caching settings
  • Automatic origin image refresh

Was this helpful?

Export as PDF
  1. Caching and acceleration

Caching interval

Token and image caching

PreviousCDN basicsNextInvalidation API

Last updated 8 months ago

Was this helpful?

Token caching settings

CDN caching accelerates the loading times of images as it allows to host them as close as possible to your end users. By using CDN caching, your ensure maximum performance of your website. You can define the max-age and s-maxage attributes in the Cache-Control HTTP Header of images delivered by Cloudimage to control the caching behavior.

When this cache expired, the image will be requested from the origin and the new image delivered to the client. Reduce the default values if you have rotating images but static image URLs without versioning.

We recommend using if you need to refresh your images as it will not impact your CDN cache-hit ratio.

Directive
Description

max-age

The time in seconds that the image is allowed to be re-used. For instance, max-age=36000 indicates that an image remains in the browser cache for the next 36 000 seconds (10 hours).

s-maxage

If you have rotating origin images but do not change the name, you need to follow the chart:

Setting default cache

You can set the desired values in the admin console, under Image Settings -> Caching.

Image caching settings

You can define the caching interval of a specific image by setting the ci_cache=X URL parameter of the image where X is the interval in seconds.

This will override the max-age and s-maxage attributes only for this image.

Automatic origin image refresh

If you need to use a very small caching interval for a specific image (for example, snapshots from a live webcam or a specific chart with dynamically changing contents), you need to change the Automatic origin image refresh setting in your Admin console. This tells our resizing servers to update all origin images after this interval has expired.

This directive applies only to the caching in CDN. To maximise performance, we recommend you set a high value here and perform on images when needed.

/sample.li/now.php?ci_cache=10
Invalidation
Invalidation