База знаний

Measure cache effectiveness

Эта статья есть на вашем языке: Как оценить эффективность кэша

Compare cache hits, transferred data, and origin load to determine whether caching helps your site. One percentage is insufficient: ten small stylesheets and one large video affect request counts and transferred volume differently.

Record comparable measurements

  1. Open WebShield → example.com → Site protect cache and confirm caching is enabled. Replace the domain with yours.
  2. Check Режим разработки (Development mode). Normal cache effectiveness cannot be evaluated while bypass mode is active.
  3. Open Site protect stats → Запросы (Requests). Select Graphic period and record Cache Hit, Data Served, and Cached.
  4. Measure again after a comparable period without another purge. Also compare load and requests in your origin’s logs if available.

Understand the values

Cache Hit is the number of requests marked HIT divided by the number of requests in that metric’s selection, multiplied by 100%. It is a request-count percentage, not a byte percentage.

Cached measures response-body data sent for HIT responses. Data Served measures total response-body data in the corresponding selection. The cache-hit percentage therefore need not equal the share of data volume served from cache. These summary metrics are not individual request records.

After a purge, WebShield fetches files from the origin again. Initial requests may miss the cache, so avoid judging performance solely from the period immediately after purging.

Investigate a low hit rate

Check whether clients repeatedly request the same public static files. Under Site protect cache, review Параметры в адресе (Query parameters). When query parameters are included, ?v=2 and ?v=3 create separate variants. Check storage duration and rules that disable caching.

Do not improve a percentage by caching account pages, carts, or personalized responses. The useful outcome is fewer repeated origin requests while preserving correct content for each visitor. If the figures conflict with actual origin load, provide support with the selected period and recorded metrics.

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