scache_rnshift
Description
bool scache_rnshift(resource session, string path)
bool $SCacheConnection->rnshift(string path)
scache_rnshift retrieves first (ie. current) element from begin of a ring in given path. Last element can be retrieved with scache_rnpop.
Both scache_rnshift and scache_rnpop remove element from ring after retrieving while scache_rnget doesn't remove element it touches.
Parameters
session
path
Slash (/) separated null-terminated path on backend's session tree
Return values
Stored content on success or FALSE if given path does not exist or error occurred.
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 Caching is not allowed on assigned partition.
- 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.
Notes
Example
<?php ?>