session_cache_limiter — Retrieve and Set Cache Limiter
The session_cache_limiter function returns the current cache limiter name, defines HTTP cache‑control policies such as nocache, public, and private, accepts an optional limiter argument, and can be used in PHP scripts to control client and proxy caching behavior.
Function: string session_cache_limiter([ string $cache_limiter ]) session_cache_limiter() returns the name of the current cache limiter.
The cache limiter determines the Cache-Control HTTP response header sent to the client or proxy, controlling how page content is cached. Values include nocache (prevent caching), public (allow client and proxy caching), and private (allow client caching only).
Parameter cache_limiter – optional string to set a specific cache limiter.
Return value
Returns the name of the cache limiter currently in use.
Example
<?php
/* Set cache limiter to 'private' */
session_cache_limiter('private');
$cache_limiter = session_cache_limiter();
echo "The cache limiter is now set to $cache_limiter<br />";
?>Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
