HomeCore Learning Journey › Lab 8 — Cache rules for plan pages

Lab 8 — Cache rules for plan pages

Purpose: Run a local dispatcher (or dry-run the config), write cache and filter rules for the PHI plan section, and observe invalidation.

Who this page is for

AudienceWhy it matters to you
All engineersPairs with Session 8

Goal

A working (or validated) dispatcher config where plan pages cache, denied paths 404, and publishing flushes correctly.

If you cannot run Apache locally, use the dispatcher SDK's validator against the config — every exercise below has a "validate" variant.

Steps

  1. Start from the default dispatcher config in your project (dispatcher/ module or vendor default dispatcher.any).
  2. Filters: confirm deny-by-default, then allow only what the PHI site needs:

allow /content/phi/* pages (html), /etc.clientlibs/*, /content/dam/phi/*. Verify that .json on content, /crx/*, /system/* are denied.

  1. Cache rules: cache /content/phi/*; add /ignoreUrlParams for utm_* so campaign links still hit cache.
  2. statfileslevel: set to a level that scopes invalidation to a site section (e.g. 3 for /content/phi/plans).
  3. Request the gold-hospital page twice; confirm the second is a cache hit (file exists in docroot; publish access

log shows one render).

  1. Publish a content change to the page from author; observe the .stat touch and that the next request re-renders.
  2. Negative test: request /content/phi/plans/gold-hospital.infinity.json through the dispatcher — expect 404/blocked.

Checkpoint

VerifyExpectation
Second requestServed from docroot file, no publish hit
utm-parameterised URLStill a cache hit
Publish actionInvalidates only the plan section (statfileslevel scoping)
Raw JSON/console pathsBlocked at dispatcher

Quick navigation