Share on Google+Share on Google+


In this example you will learn how to create session_cahe_limter()in PHP.


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. 



Let's see the example:

$cachelimiter = session_cache_limiter();

$cacheexpire = session_cache_expire();

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.


Posted on: July 31, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.