scache_vunset, scache_vclear
Description
long scache_vunset(resource session, string path)
long scache_vclear(resource session, string path)
long scache_vclear(resource session, string path)
long $SCacheConnection->vclear(string path)
scache_vuset deletes value from given path. Effectively result is same than scache_vsetting value to 0, thought scache_vunset actually removes path from tree.
scache_vclear is alias to scache_vunset to keep symmetry with class interface.
Parameters
session
path
Slash (/) separated null-terminated path on backend's session tree
Return values
Path's' current value is returned on success, FALSE on failure.
In case of failure, error codes resolvable by scache_lasterr is one of below :
- SCERR_NOTEXIST Path given does not exist
- SCERR_NO_SESSION Connected session does not exist or has been expired. Connection is not valid any more.
- SCERR_NO_ACCESS Shared counters are not allowed on assigned partition.
- 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.
Generally you can ignore the returned value.
Examples
<?php /* get connection */ $session = scache_reset('MyEasilyGuessableSecret'); /* value is */ scache_vset($session, 'my/path', 2); /* and value doesn't */ scache_vunset($session, 'my/path'); ?>