|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59108 Session count
Submitted: 2010-03-11 03:51 UTC Modified: 2010-03-15 02:26 UTC
From: admin at mrmunk dot dk Assigned:
Status: Closed Package: WinCache (PECL)
PHP Version: 5.3.2RC3 OS: Windows 2008 R2 Web
Private report: No CVE-ID: None
 [2010-03-11 03:51 UTC] admin at mrmunk dot dk
I'd like to have a function that can tell me how many sessions 
are initiated

Something like:
wincache_session_count ?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-11 12:09 UTC] don dot raman at microsoft dot com
This code should do exactly what you want:


function wincache_session_count( )
    $ucache_info = wincache_ucache_info();
    $count = 0;
    foreach ( $ucache_info['ucache_entries'] as $entry ) {
        if ( $entry['is_session'] )
    return $count;


You can use the above function till we decide on this feature request. If you can provide some context behind usefulness of the API you are asking for, it will be a good data point in our triage meeting.
 [2010-03-15 02:26 UTC] ksingla at microsoft dot com
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

We have separated user cache and session cache. We have added a function (wincache_scache_info) to get session cache properties. count in the return value will be the session count. wincache_scache_info also accepts an optional boolean (summaryonly) which when set to true will not return individual entries.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 12:01:25 2019 UTC