База знаний

Enable caching for static files

Эта статья есть на вашем языке: Как включить кэширование файлов

Caching lets protection servers serve stored images, stylesheets, scripts, and fonts without requesting your origin again. The standard switch does not enable HTML page caching.

The site must use WebShield, management must be available, and its plan or options must include caching. Replace example.com with your domain. Confirm that the required files already work on the origin.

Enable caching

  1. Open WebShield → example.com → Site protect cache.
  2. Turn on the switch in the Site protect cache card.
  3. Wait for Saved.... This setting saves automatically without a separate button.
  4. Allow deployment to protection servers. Reload the panel and confirm the switch remains enabled.
  5. Confirm Режим разработки (Development mode) is off. It temporarily bypasses caching and affects your test.

If the tab is missing, check whether your plan includes the feature. Настройки кэша появятся в течение нескольких минут (Cache settings will appear within a few minutes) means additional controls are not ready; wait and reload.

Test one file

Open https://example.com/css/app.css twice with browser caching disabled in developer tools. Inspect its content and compare requests in your origin logs. Serving a stored copy does not require another origin request for that file. If both requests reach the origin, check development mode and any Не кэшировать (Do not cache) rule for this path.

Check images, scripts, and a complete page. If a replaced file still shows an old version, use a targeted purge. Purging WebShield does not remove copies already saved in visitors' browsers.

Then set cache durations and check URL parameter handling if you publish files with ?v=2. HTML requires a separate rule with exclusions, rather than just this switch.

Статья была полезна?