scache_shstat

Description

long scache_shstat(resource session, string path)
long $SCacheConnection->shstat(string path)

scache_shstat is operationally equal to session spesific scache_stat but unlike it, scache_shstat operates on shared storage that is common and accessible for all clients. Shared storage is for operating data common to all clients and for inter-client communication.

scache_shstat queries node given path and returns existence and type of it. Return value is :

Parameters

session
Session resource returned from scache_open, scache_reset or scache_connect
path
Slash (/) separated path on backend's session tree. Path parameter is not binary safe.

Return values

Node type success, FALSE on failure. Node types are :

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

Examples

<?php

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

scache_shset($session, 'this/is/my/path', 'value');

if (scache_shstat($session, 'this/is/my/path') == SCNODE_VALUE) 
    echo "Yes, this is SCNODE_VALUE...\n";

if (scache_shstat($session, 'this/is/my') == SCNODE_BRANCH) 
    echo "..and yes, you are right, this is SCNODE_BRANCH..\n";
?>