It Get or set the current cache limiter.

Syntax: session_cache_limiter ( string cache_limiter )

Description:

It returns the name of the current cache limiter. If cache_limiter is specified, the name of the current cache limiter is changed to the new value.

The cache limiter defines which cache control HTTP headers are sent to the client. These headers determine the rules by which the page content may be cached by the client and intermediate proxies. Setting the cache limiter to nocache disallows any client/proxy caching. A value of public permits caching by proxies and the client, whereas private disallows caching by proxies and permits the client to cache the contents.

Example:
Code:


/* set the cache limiter to 'private' */

session_cache_limiter('private');
$cache_limit = session_cache_limiter();

echo "The cache limit is set to $cache_limit
";

Output:

The cache limit is set to private

eXTReMe Tracker