Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To cache Laravel pages at Cloudflare’s edge, create a Cache Rule that makes only selected public HTML routes eligible, then have Laravel send shared-cache-safe headers. Exclude authenticated, personalized, cart, checkout, administration, preview, mutation, and other stateful requests. After deployment, purge or invalidate changed objects and verify the result with CF-Cache-Status: an initial MISS followed by HIT is normal, while DYNAMIC indicates request ineligibility and BYPASS means Cloudflare declined to store the response.
What does full-page edge caching change in a Laravel application?
Without an explicit rule, Cloudflare does not cache dynamic HTML by default. Each request for a Laravel page normally reaches the application, which renders a response and returns it through Cloudflare. Full-page edge caching stores an eligible HTML response at a nearby Cloudflare data center so later eligible visitors can receive that representation without another Laravel render.
This is different from Laravel’s application cache. Laravel can store query results, computed values, sessions, or other data in Redis, Memcached, DynamoDB, a relational database, or a filesystem disk. That reduces work inside Laravel, but it does not by itself make the final HTML response cacheable at Cloudflare’s edge. Edge eligibility, cache rules, cache keys, and HTTP response headers still decide whether Cloudflare stores and serves the page.
The practical objective is selective caching: make anonymous, public pages fast and inexpensive to serve while ensuring that no visitor receives another user’s identity, permissions, cart, checkout state, or other private content.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Which Laravel routes are safe to cache publicly?
Start with routes whose rendered HTML is the same for every unauthenticated visitor, or whose variations are intentionally represented in the cache key. Typical candidates include a public home page, documentation pages, marketing pages, public articles, and product or category pages that do not embed per-user data.
Do not put a broad “all HTML” rule in front of an application unless every path and cookie has been reviewed. Keep the following classes outside a full-page rule:
- Login, logout, registration, password-reset, and account pages.
- Authenticated dashboards and pages that display a user name, role, subscription, permissions, or account data.
- Cart, checkout, payment, order, and other transaction paths.
- Administration, staff, moderation, preview, draft, and staging paths.
- Forms or endpoints that mutate state, including POST, PUT, PATCH, and DELETE requests.
- Responses that vary by a session, authorization token, experiment assignment, locale cookie, or another cookie unless that variation is deliberately included in the cache design.
- APIs and JSON endpoints, unless they have a separately designed and tested caching policy.
HEAD requests can normally share the same representation as GET, but every method that can change state should bypass the page rule. If a page contains a small personalized fragment, render that fragment after the cached shell with a separate request or client-side mechanism; do not cache the entire personalized response.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
How do I configure Cloudflare to cache selected Laravel pages?
Create a rule for the production hostname and the exact public paths, then explicitly set an edge TTL. A path-limited rule is safer than relying on Cloudflare to infer which Laravel responses are public.
- Proxy the production hostname. In the Cloudflare dashboard, open the relevant zone and DNS record, and confirm the record is proxied. Requests must traverse Cloudflare before an edge cache can apply.
- Open Cache Rules. Go to Caching and then Cache Rules, choose Create rule, and give the rule a name that identifies the public Laravel routes it covers.
- Match the hostname and paths. Require the production hostname and list only public route prefixes or exact paths. Keep administration, preview, account, cart, checkout, and API paths outside the match.
- Make the request eligible for cache. Choose the action that marks matching responses as eligible for caching, and set an explicit edge TTL that matches how quickly the content must change. A short TTL limits staleness; a longer TTL reduces origin traffic but makes purge discipline more important.
- Add request bypass conditions. Exclude non-GET and non-HEAD methods, requests carrying login or session cookies, requests with an authorization header, and paths for stateful features. Bypass query strings that alter the rendered HTML unless your cache key intentionally distinguishes every meaningful value.
- Order overlapping rules carefully. A specific bypass for private or stateful paths must take precedence over a broad public-page rule. Review the final expression as Cloudflare evaluates it, not just the labels shown in the editor.
- Deploy and test one route. Start with a single clearly public page, inspect headers, and expand the match only after the response is demonstrably safe.
The exact TTL is a content decision rather than a universal performance setting. A page that changes only after an editorial publish can tolerate a longer edge lifetime if your deployment process purges it. A frequently changing page needs a shorter lifetime or reliable invalidation.
What should the bypass expression cover?
The expression should represent both request-time and path-time safety checks. In plain language, it should allow only GET or HEAD requests to the production public paths, while bypassing when any of these are true:
- A session, login, authentication, or other identity cookie is present.
- An
Authorizationheader is present. - The path is an account, admin, preview, cart, checkout, payment, or mutation endpoint.
- The method is not GET or HEAD.
- A query parameter changes the HTML and has not been included in a deliberate cache-key design.
Cookie names differ between Laravel installations and authentication packages, so inspect the cookies your application actually sets rather than copying a name from another project. When in doubt, bypass the request and confirm the response is safe before widening the rule.
How should Laravel send cache-safe headers?
Apply Laravel’s cache.headers middleware only to routes intended for shared caching. Laravel documents the directives for public responses, browser freshness, shared-cache freshness, stale-while-revalidate behavior, and entity tags.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
A documented route-group example is:
Route::middleware('cache.headers:public;max_age=30;s_maxage=300;stale_while_revalidate=600;etag')->group(function () {
// Public, non-personalized routes
});
Here, public permits shared caches, max_age=30 gives a browser a 30-second freshness period, s_maxage=300 gives shared caches a five-minute freshness period, stale_while_revalidate=600 allows a stale response to be served while revalidation occurs for up to ten minutes, and etag enables conditional validation. Those values are an example policy, not a universal recommendation; set them to the actual freshness requirement of the route.
Check the complete response after middleware, authentication, localization, analytics, and exception handlers have run. A route that appears public in the controller can become uncacheable later in the stack.
Which response headers commonly prevent storage?
Before troubleshooting Cloudflare, inspect the origin response for conditions that make a shared cache unsafe:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsSet-Cookieon a page intended to be shared.Cache-Control: privateorno-store.Vary: *, which prevents a useful shared representation.- Cookies or authorization state that change the generated HTML.
Some Laravel middleware starts a session or writes a cookie even when the page does not visibly display user data. Remove that behavior from genuinely public routes, or bypass those requests. Do not simply force Cloudflare to cache a response that contains private data.
How do I choose a cache key and handle query strings?
Cloudflare must know which requests represent the same object. A public path with tracking parameters can often share one HTML representation, but a parameter that changes sorting, filtering, pagination, currency, locale, or content must not be collapsed into that same object.
Use one of two explicit policies:
- Bypass changing queries. If query-driven HTML is difficult to model safely, exclude requests containing those parameters from the full-page rule.
- Include meaningful values in the key. If each value produces a distinct public page, configure the cache-key behavior so those values remain distinct, and verify that unrecognized parameters cannot create unbounded or unsafe variants.
Do not assume that every query parameter is harmless because it is used for analytics. Confirm that the origin renders the same HTML before normalizing or ignoring it. Test canonical URLs, pagination, filters, language selectors, and campaign links separately.
What is the correct deployment and purge workflow?
Update the Laravel origin first, then remove or invalidate stale edge objects. If you purge before the new code or content is live, the first refill can capture the old response.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Deploy the new Laravel code or publish the changed content at the origin.
- Confirm the origin serves the intended HTML and headers without Cloudflare in the way, or by using an origin verification method that your environment supports.
- Choose the narrowest Cloudflare purge selector that covers the change: individual URLs for a small edit, a prefix for a section, a hostname for a site-wide change, or tags when your tagging design maps content to cache objects.
- Use a complete purge only when the scope truly requires it; it discards unrelated warm objects.
- Request the affected public URL twice and inspect the cache status. A
MISSimmediately after a purge is expected because the object must be fetched again; a later request should become aHITif the response remains eligible.
Cloudflare also supports invalidation semantics in which the object is retained but marked stale and the next request revalidates it. This can preserve an efficient refill when conditional validation is available. Use purge when the old representation must be removed immediately, and use invalidation when revalidation is acceptable.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
ETag or Last-Modified support lets Cloudflare ask the origin whether a stale object changed. A 304 response can avoid retransmitting an unchanged body while still confirming freshness.
How do I read CF-Cache-Status during testing?
Send two unauthenticated requests to the same canonical URL, with the same method and relevant headers, and inspect the response headers. Interpret the result together with Laravel and web-server logs.
| Value | Meaning | What to check next |
|---|---|---|
MISS |
The request was eligible, but the object was not present at that edge location. | Repeat the request after the first response and confirm whether it becomes HIT. |
HIT |
Cloudflare served the representation from its cache. | Confirm that the body contains no identity, session, cart, or other per-user data. |
DYNAMIC |
The request was not eligible for caching under the request conditions or rule. | Review method, hostname, path, query string, cookies, and authorization headers. |
BYPASS |
Cloudflare chose not to store the response, commonly because origin headers or a response-time rule made it non-cacheable. | Inspect Cache-Control, Set-Cookie, Vary, and other response headers. |
Do not treat DYNAMIC and BYPASS as interchangeable. The former points primarily to request-time eligibility; the latter indicates that a response reached a point where Cloudflare rejected it for storage. A MISS is not an error after a purge or on a cold edge location.
Free tools Windows power users keep installed
One-click scans. No signup required.
Why is my Laravel page returning DYNAMIC?
DYNAMIC means the request did not qualify for the cache rule. The fastest diagnosis is to compare the failing request with a known-public request and identify which eligibility condition differs.
Check the method and URL
Confirm the request is GET or HEAD, uses the production hostname covered by the rule, and matches the intended public path. A POST form submission, a preview URL, or a hostname that is not proxied will not behave like the test page.
Check cookies and authorization
Use browser developer tools or a command-line header inspection to see whether a session or login cookie is being sent. Also check for an Authorization header. If either is present, bypassing is normally the safe result.
Check query parameters
Compare the complete URL, not just its path. A filter, sort, locale, or preview parameter may either need its own cache-key variant or need to bypass full-page caching.
Check rule scope and ordering
Make sure the public rule matches the hostname and path, and that a higher-priority bypass is not unexpectedly matching. Conversely, ensure a broad rule is not overriding the intended private-path exclusion.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Why is my Laravel page returning BYPASS?
BYPASS means Cloudflare received a response but decided not to cache it. Inspect the origin response headers for Set-Cookie, Cache-Control: private, Cache-Control: no-store, and Vary: *.
Trace which Laravel middleware added the header or cookie. Session startup, authentication, preview tooling, localization, and application-wide security middleware are common sources. Fix the behavior only for routes that are truly public; private routes should continue to bypass.
After correcting the origin response, purge the old object if one exists, request the page again, and verify that the first eligible request is a MISS followed by a HIT. If it remains BYPASS, inspect response-time rules and compare the actual headers from the edge response with those from the origin.
How do full-page edge caching and Laravel data caching differ?
They operate at different layers and should be evaluated separately. Laravel data caching can reduce database and computation work while the application still renders every HTML response. Cloudflare full-page caching can avoid the Laravel request entirely for a warm, eligible object.
| Decision axis | Cloudflare full-page edge cache | Laravel application/data cache |
|---|---|---|
| Personalization risk | High if a shared HTML object contains identity, authorization, cart, or other per-user content; requires strict route and cookie exclusions. | Depends on the key and stored value; data can be partitioned by user or context before rendering. |
| Freshness control | Edge TTL, purge, invalidation, and conditional revalidation determine how long HTML remains available. | Application cache lifetime and explicit invalidation determine how long data is reused inside Laravel. |
| Purge granularity | Supports URL, prefix, hostname, tag, and everything selectors, with scope chosen to match the content change. | Depends on the cache store and the keys or tags used by the application. |
| Query-string behavior | Cache-key policy decides whether variants share an object or bypass. | Application code decides whether query values participate in a data key. |
| Origin load | A warm HIT can serve the page without a Laravel render at that edge; a MISS refills from origin. |
Laravel still receives the request and performs routing and rendering, but expensive data lookups may be avoided. |
| Observability | Use CF-Cache-Status alongside origin logs to distinguish MISS, HIT, DYNAMIC, and BYPASS. |
Use Laravel logs, cache-store metrics, and application instrumentation to observe hits and misses. |
Many sites use both: Laravel caches expensive data, while Cloudflare caches only the final HTML for carefully selected anonymous routes.
What safety checks should run after every framework or middleware change?
Cache behavior can change without any edit to the Cloudflare rule. Use a repeatable checklist after authentication, session, localization, analytics, exception, or response-header middleware changes.
- Request each public route without login cookies and confirm the body is generic.
- Request the same route while logged in and confirm it is bypassed or otherwise isolated from the anonymous object.
- Check that public responses do not set a session cookie.
- Check
Cache-Control,ETagorLast-Modified, andVary. - Test canonical and query-string URLs that can change the rendered page.
- Submit a form and confirm mutation requests never receive a cached page response.
- Check admin, preview, cart, checkout, and account paths explicitly.
- Review origin logs while testing a cold URL, then confirm a warm request does not reach Laravel unexpectedly.
- After a content deployment, purge or invalidate the affected scope and verify the refill contains the new version.
What are the main failure modes and their fixes?
| Symptom | Likely cause | Safe correction |
|---|---|---|
Every request is DYNAMIC |
The hostname is not proxied, the rule does not match, or a method, cookie, authorization, or query exclusion is always true. | Verify proxying, rule scope, method, headers, cookies, and URL conditions with one deliberately anonymous GET. |
Responses are BYPASS |
The origin emits a private/no-store directive, Set-Cookie, Vary: *, or another non-cacheable signal. |
Find the middleware that adds it and remove it only from genuinely public routes. |
| A logged-in user sees anonymous HTML | The cache rule ignores a session or identity cookie. | Add a cookie or authorization bypass, purge affected objects, and retest in an authenticated session. |
| Anonymous users see another user’s page | Personalized content was rendered under a shared URL. | Immediately stop sharing that route, purge the objects, and redesign the page so personalized data is isolated. |
| New content does not appear | The edge TTL has not expired and no purge or invalidation was performed. | Update the origin first, then purge or invalidate the affected URL, prefix, hostname, or tag. |
| A purge is followed by old content | The origin was not updated before the refill, or another cache layer still contains the old response. | Confirm the origin version, purge again if necessary, and inspect every caching layer and response header. |
| Query variants collide | Parameters that change HTML were normalized away or omitted from the cache key. | Bypass those queries or include their meaningful values in a tested cache-key policy. |
Is full-page Cloudflare caching worth using for Laravel?
It is worthwhile when a substantial share of traffic is anonymous, the selected pages are genuinely identical across visitors, and the team can operate TTL and purge rules reliably. The benefit is architectural: warm edge hits can avoid Laravel rendering and origin work, but no universal speed-up percentage applies to every geography, page, or deployment.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →It is not a shortcut for unsafe personalization. If a route mixes public markup with account, cart, authorization, or experiment data, either split those concerns or leave the route uncached. A smaller set of confidently public pages is better than a broad rule that risks disclosure or stale transactions.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
What should a production rollout look like?
Roll out incrementally so a mistake affects one known-public route rather than the whole application.
- Select one static-like public Laravel page and document the content’s acceptable staleness.
- Apply the route-level
cache.headersmiddleware with a deliberately chosen browser age, shared-cache age, stale-while-revalidate window, and ETag behavior. - Create a hostname-and-path Cache Rule with explicit edge TTL and bypass conditions.
- Test anonymous, authenticated, cookie-bearing, query-string, preview, and mutation requests.
- Confirm the expected
MISSthenHITsequence and verify that origin logs show no request for a warm hit. - Add deployment automation or an operational checklist that updates the origin before purging or invalidating changed objects.
- Expand to additional public routes only after their response headers and personalization behavior have passed the same checks.
Keep the rule, route list, cookie exclusions, TTL rationale, and purge scope documented with the application. That record makes future framework upgrades and middleware changes safer to review.
Frequently Asked Questions
Can I cache Laravel pages that contain a CSRF token?
A CSRF token is usually tied to a session, so a shared full-page object can expose one visitor’s token to another. Keep token-bearing forms out of the shared response or render the form and token through a separate uncached request.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Do browser developer tools show whether Cloudflare served a cached page?
Yes. Open the Network panel, select the document request, and inspect response headers for CF-Cache-Status, Cache-Control, ETag, and Set-Cookie. Test in a private window or with a clean cookie jar so an existing login session does not trigger an intentional bypass.
Will a Cloudflare purge instantly clear every visitor’s cached copy?
The scope and propagation of a purge depend on the selector you choose and Cloudflare’s distributed cache system. Treat the object as potentially stale until you verify the affected URL from the regions and hostnames that matter to your service.
Should I cache Laravel error pages at the edge?
Generally no. Error responses can be temporary, contain diagnostic details, or mask a recovery after the origin is fixed. Keep exception and maintenance responses outside the public HTML rule unless you have a separate, deliberately bounded policy.
Can a cached HTML page still load uncached API data?
Yes, but the page shell and the API become separate caching decisions. Ensure the browser-side request handles authentication and errors correctly, and never assume that caching the shell makes a personalized API response safe to share.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

