It returns current cache expire.

Syntax: session_cache_expire ($new_cache_expire)

Description:

The parameter “$new_cache_expire” is given, the current cache expire is replaced with new_cache_expire.

It returns the current setting of session.cache_expire. The value returned should be read in minutes, defaults to 180.

Example:
Code:


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

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

/*   set the cache expire to 40 minutes */
session_cache_expire(40);
$cache_expire  = session_cache_expire();

/* start the session */

session_start();

echo "The cache is set to $cache_limiter
"; echo "The cached session pages expire after $cache_expire minutes";

Output:

The cache is set to private
The cached session pages expire after 40 minutes

eXTReMe Tracker