Share on Google+Share on Google+

Session_cache_limter()

Advertisement
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.

Advertisements

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.