In this example you will learn how to create session_cahe_limter()in PHP.
In this example you will learn how to create session_cahe_limter()in PHP.Session_cache_limter()
session_cache_limiter() returns the name of the current cache limiter. The cache_limiter defines which cache control HTTP headers are sent to the client that determines which page content may be cached by the client and intermediate proxies. If we set the cache limiter to nocache, it wont allow any client/proxy caching while public caching allows the caching through the proxy and the clients. On the other hand, the private caching disallows caching by proxies and permits the client to cache the contents.
If cache_limiter is specified, the name of the current cache limiter is changed to the new value.
Parameters
cache_limiter();
Let's see the example:
<?php
session_cache_limiter('roseindia');
$cachelimiter = session_cache_limiter();
session_cache_expire(180);
$cacheexpire = session_cache_expire();
session_start();
echo "gooooood"."<br />";
echo "The cache limiter is now set to $cachelimiter<br />";
echo "The cached session pages expire after $cacheexpire min";
?>
The Output:
The cache limiter is now set to roseindia.
The cached session pages expires after 180 minutes.
gooooood.