Rule examples: PrestaShop
This page documents the exact PrestaShop ruleset that Paradarum ships as a one-click preset: long-lived caching for static assets, a short cache for catalog pages, and full bypass for the admin, cart, and checkout flows. You can build it from the tables below or apply the whole bundle from the CMS Presets Quick Setup card.
Open the Quick Setup card on the property's General settings page, choose PrestaShop, and click Apply Preset. Paradarum creates each rule below as an individual, editable cache rule. See CMS Presets for the full flow.
These rules control what is cached. To automatically purge the cache when products, categories or CMS pages change, install the Paradarum CDN Purge module for PrestaShop.
Cache rules
PrestaShop serves a catalog that changes often (prices, stock) alongside per-customer pages (cart, checkout, account). The preset caches static assets for 30 days, gives catalog pages a short 5-minute cache, and bypasses the cart, order, and admin paths entirely.
The patterns use nginx-style location matching: ~* is a case-insensitive regex on the URI, ^~ is a prefix match, and the bare / is the catch-all fallback that runs last.
| Order | Path / pattern | Match | TTL (seconds) | Meaning |
|---|---|---|---|---|
| 1 | ~* \.(jpg|jpeg|png|gif|ico|css|js|woff2)$ | Regex | 2592000 | Static assets cached 30 days |
| 2 | ^~ /admin | Starts with | 0 | Admin back office — never cached |
| 3 | ^~ /cart | Starts with | 0 | Cart — never cached |
| 4 | ^~ /order | Starts with | 0 | Checkout / order — never cached |
| 10 | / | Catch-all | 300 | Catalog & pages cached 5 minutes |
A TTL of 0 seconds tells the edge never to cache that location. The cart, order, and admin paths are set to 0 so customers always see their own live state. The catch-all / rule is given order 10 so it runs last, after the bypass rules.
Real PrestaShop installations rename the admin folder to a randomized name for security (for example /admin_a1b2c3xyz instead of /admin) — and the same is true for Magento back ends. The ^~ /admin rule in this preset assumes the default path, so if you have renamed yours, edit the rule's pattern to match your actual admin folder. Likewise, confirm the cookie names below match your store's session cookies. If the admin path is wrong, your back office may be cached or its bypass rule may silently miss.
Create these rules in the panel
Open the property's Rules tab, click Add cache rule, and create each row from the table above — set the Path / pattern, the Match type and the TTL. Give the catch-all / rule the highest order so it runs last. See match operators for the match types.
Creating or editing a rule does not push to the OpenResty edge synchronously — the edge polls configuration, so changes go live within a short interval rather than instantly.
Bypass cookies
To keep per-customer state out of the shared cache, the PrestaShop preset bypasses caching whenever either of these cookie name prefixes is present:
| Cookie prefix | Set when |
|---|---|
PrestaShop- | A customer has an active PrestaShop session (cart, login, currency, etc.) |
PHPSESSID | A PHP session is active |
Attach them to the catch-all catalog rule under Location Features → Cache Bypass Cookies, so any shopper with an active session always receives a fresh page.
Quick Setup creates the cache rules and applies general settings, but it does not attach the preset's bypass-cookie list automatically. After applying the PrestaShop preset, open the catch-all page rule and add PrestaShop- and PHPSESSID under Location Features → Cache Bypass Cookies. Without this, customers risk being served another shopper's cached page.
Recommended security
The PrestaShop preset recommends a strict WAF profile — block mode at high security level, all OWASP rule groups on, with rate limiting (threshold 120, ban duration 600 seconds). WAF is configured separately from the Quick Setup apply action, in the WAF section of your dashboard.
Where to go next
- CMS Presets (Quick Setup) — apply this entire bundle in one click.
- Cache rules — TTLs and Location Features (bypass cookies, cache key, minification, WebP) in depth.
- Match operators — the five URL match types.
- Rule examples: WordPress — the WordPress preset reference.
- Caching and query strings — query-string cache-key behavior at the property level.