scache_drop
Description
bool scache_drop(resource session)
bool $SCacheConnection->drop()
scache_drop destroys session and all data associated with it from scached backend. After completion session id is not valid any longer.
Parameters
session
Return values
TRUE on success, FALSE if session not existent or error.
In case of failure, error codes resolvable by scache_lasterr is one of below :
- SCERR_NO_SESSION Connected session does not exist or has been expired. Connection is not valid any more.
- SCERR_LIMITS_REACHED Partition has exceeded its memory or node limits and new session cannot be created until memory is freed.
- SCERR_NOT_CONNECTED Connection to backend is broken and cannot be reconnected.
- SCERR_PROTOCOL Internal protocol error has occurred when communicating to backend. This indicates something is severely broken.
Examples
<?php /* we do have a session */ $session = scache_reset('MyEasilyGuessableSecret'); /* and we do not have a session */ scache_drop($session); ?>