Brekz Cloudflare Cache¶
What is Cloudflare Cache?¶
Cloudflare Cache is a globally distributed caching system that stores static and dynamic content on edge servers close to end users. By caching content on these edge locations:
- Reduces load on origin servers
- Accelerates load times by serving content closer to users
- Improves scalability of applications
- **Reduces b
- andwidth costs** by minimizing requests to the origin
How does it work?¶
sequenceDiagram
participant User as User
participant Edge as Cloudflare Edge
participant Origin as Origin Server
User->>Edge: Request for content
alt Content in cache
Edge-->>User: Cached content (fast)
else Content not in cache
Edge->>Origin: Request to origin
Origin-->>Edge: Response
Edge->>Edge: Cache content
Edge-->>User: Fresh content
end
When a user requests content: 1. The request arrives at the nearest Cloudflare edge datacenter 2. Cloudflare checks if the content is already cached 3. Cache HIT: Content is served directly from cache (very fast) 4. Cache MISS: Content is fetched from the origin server, cached, 5. and then served
What are Cache Rules?¶
Cache Rules are configuration settings that determine which content is cached, how long it remains cached, and under what conditions the cache is used. They replace the older Page Rules for caching configuration and offer more flexibility.
Benefits of Cache Rules¶
- ✅ Precision: Fine-grained control over caching behavior per URL, file type, or custom criteria
- ✅ Performance: Optimal cache configuration per content type
- ✅ Flexibility: Combination of multiple conditions
- and actions
- ✅ Priority: Control over the order in which rules are applied
Brekz specific Cache Rules¶
Below are the cache rules configured for this environment:
Rule 1: PrestaShop Page Caching AT¶
Purpose: Edge full HTML page caching for PrestaShop Brekz.AT pages
Expression:
(http.host eq "www.brekz.at"
and not http.request.uri contains "/module/brekz_my_account_api"
and not http.request.uri contains "/adresse"
and not http.request.uri contains "/module/brekz_identitypage/identity"
and not http.request.uri contains "/adressen"
and not http.request.uri contains "/authentifizierung"
and not http.request.uri contains "/warenkorb"
and not http.request.uri contains "/kennung"
and not http.request.uri contains "/mein-Konto"
and not http.request.uri contains "/bestellungsverlauf"
and not http.request.uri contains "/auftragsverfolgung-gast"
and not http.request.uri contains "/discount"
and not http.request.uri contains "/bestellung"
and not http.request.uri contains "/bestellungsverfolgung"
and not http.request.uri contains "/schnell-bestellung"
and not http.request.uri contains "/bestellschein"
and not http.request.uri contains "/kennwort-wiederherstellung"
and not http.request.uri contains "/suche"
and not http.request.uri contains "/index.php"
and not http.request.uri contains "/administrator"
and not http.request.uri contains "/module/copernica"
and not http.request.uri contains "/kontakt"
and not http.request.uri contains "docdata"
and not http.request.uri contains "disableCache=1"
and not http.request.uri contains "themes/brekz-2017/cache"
and not http.user_agent contains "BrekzApp")
Cache Settings: - Cache eligibility: Eligible for cache - Edge Cache TTL: Ignore cache-control header and use this TTL: 3 Hours - Browser Cache TTL: Default - Cache by device type: Enabled
Screenshots:
Cloudflare Dashboard Link: [Direct link to this rule]