scache_setopt

Description

mixed scache_setopt(resource session, long option, mixed new_val)
mixed $SCacheConnection->setopt(long option, mixed new_val)

scache_setopt sets session's options. Settable options are :

Parameters

session
Session resource returned from scache_open, scache_reset or scache_connect
option
Currently supported values are SCACHE_OPT_EXPIRES and SCACHE_OPT_KEEPONELIMIT
new_val
New value for specified option.

Return values

Previous setting of specified option or FALSE on error.

In case of failure, error codes resolvable by scache_lasterr is one of below :

Examples

<?php

/* get connection */
$session = scache_reset('MyEasilyGuessableSecret');

if (scache_setopt($session, SCACHE_OPT_KEEPONELIMIT, true)) {

   echo "Dont expire me on error!\n";
}
?>