PHP session_cache_limiter() Function

What is session_cache_limiter Function?


The "session_cache_limiter()" function is used to get or set the current cache limiter.



In the above syntax "string" specifies the values for the cache limiter if set to "nocache" disallows any proxy or client, "public" allows caching by any proxy or client, "private" disallows caching by proxies and permits caching by the client.

Example :

$cache_limiter = session_cache_limiter();
echo "The cache limiter is now set to $cache_limiter<br/>";
Result :

The cache limiter is now set to private

In the above example the session cache limiter is set to "private" to disallow caching by proxies and allow caching by client.

PHP Topics

Ask Questions

Ask Question