php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59109 Get info about specific ucache entry
Submitted: 2010-03-11 03:54 UTC Modified: 2010-04-14 21:02 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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: admin at mrmunk dot dk
New email:
PHP Version: OS:

 

 [2010-03-11 03:54 UTC] admin at mrmunk dot dk
Description:
------------
I'd love to have a feature such as 

wincache_ucache_entry_info($key) - returns array

key_name - name of the key which is used to store the data
value_type - type of value stored by the key
use_time - time in seconds since the file has been accessed 
in the opcode cache
last_check - time in seconds since the file has been checked 
for modifications
is_session - indicates if the data is a session variable
ttl_seconds - time remaining for the data to live in the 
cache, 0 meaning infinite
age_seconds - time elapsed from the time data has been added 
in the cache
hitcount - number of times data has been served from the 
cache

I specifically need to get info about a specific entry in 
the cache for my application. I don't know where i can 
submit feature requests, so I'm sending it straight to you.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-11 03:55 UTC] admin at mrmunk dot dk
Found this after emailing Ruslany. Therefore copy-paste email.
 [2010-03-11 12:02 UTC] don dot raman at microsoft dot com
This code should do exactly what you want:

<?php

function wincache_ucache_entry_info($key)
{
    $ucache_info = wincache_ucache_info();
    foreach ( $ucache_info['ucache_entries'] as $entry ) {
        if ( !strcmp($key, $entry['key_name']) )
            return $entry;
    }
    return NULL;
}

?>

Can you let us know what scenario you are trying to solve and how are you going to use data like 'use_time' and 'last_check'?
 [2010-04-14 21:02 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 pecl.php.net.

In case this was a pecl.php.net 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.

wincache_ucache_info takes optional summaryonly and key. To get information on particular key, use wincache_ucache_info(false, "key");
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Nov 13 05:01:25 2018 UTC