Media file caching

Typically, the bulk of a page web's transfer load is accounted for its media files, most of which will be images in the page. 

All media files are handled by our dedicated storage and hosting providers. These are Amazon Web Services’s S3 service, or a generic S3 hosting service via another provider. Currently, most projects use Amazon’s own S3 service, with the exception of projects in our Swiss region.

See the Divio Cloud Developer Handbook for more information about this: 

Delivery of these files is handled by the Cloudflare Content Delivery Network, which also caches the files. 

Basic media file caching behaviour

  • Caching is provided on all projects and plans, and on Test as well as Live servers. It's automatic and requires no additional action or configuration.
  • Each file is cached indefinitely; the cache is not invalidated automatically when the file is changed, unless its URL is changed.
  • Caching is URL-based, and wholly content-unaware - the caching system does not detect when files have changed.
  • By default, only media files are cached by default. HTML is not cached. Static files (files that are part of the project code, such as CSS, JavaScript and images in the project repository) are not cached.

However, other options for caching are available on request, and caches can be invalidated on request by our infrastructure team.

Application-level caching

Applications in your projects may make use of Django's own caching framework. This behaviour can be configured in your project code.

See the Divio Cloud Developer Handbook for more information about Caching in Divio Cloud applications.

Did this answer your question?