In HHVM, I get different results for apc_cache_info(). The thing really annoys me, is the missing ['cache_list'][0]['info'].
apc_store('foo', 'bar');
var_dump(apc_cache_info('user'));
array(15) {
'num_slots' =>
int(4099)
'ttl' =>
int(0)
'num_hits' =>
double(0)
'num_misses' =>
double(0)
'num_inserts' =>
double(1)
'expunges' =>
double(0)
'start_time' =>
int(1463214762)
'mem_size' =>
double(656)
'num_entries' =>
int(1)
'file_upload_progress' =>
int(1)
'memory_type' =>
string(4) "mmap"
'locking_type' =>
string(24) "pthread read/write Locks"
'cache_list' =>
array(1) {
[0] =>
array(10) {
'info' =>
string(3) "foo"
'ttl' =>
int(0)
'type' =>
string(4) "user"
'num_hits' =>
double(0)
'mtime' =>
int(1463214762)
'creation_time' =>
int(1463214762)
'deletion_time' =>
int(0)
'access_time' =>
int(1463214762)
'ref_count' =>
int(0)
'mem_size' =>
int(656)
}
}
'deleted_list' =>
array(0) {
}
'slot_distribution' =>
array(1) {
[1470] =>
int(1)
}
}
array(11) {
["start_time"]=>
int(1463214781)
["ttl"]=>
int(-1)
["primed_entries"]=>
int(0)
["primed_live_entries"]=>
int(0)
["values_size"]=>
int(16)
["keys_size"]=>
int(3)
["primed_in_file_size"]=>
int(0)
["primed_live_size"]=>
int(0)
["pending_delete_size"]=>
int(0)
["entries"]=>
int(1)
["cache_list"]=>
array(1) {
[0]=>
array(5) {
["entry_name"]=>
string(3) "foo"
["in_memory"]=>
bool(true)
["ttl"]=>
int(0)
["mem_size"]=>
int(16)
["type"]=>
int(1)
}
}
}
see: #1853 #5505
As a note, we have the same info in "entry_name" rather than "info".
thanks i've patched that in my code, and now i've realized that i'm also missing "creation_time" and "mtime", and they are not in hhvm :(
I don't think we currently track that, although it might be possible to partially infer them based on the expire time...
the creation_time and mtime keys (among others) are still missing, could somebody reopen this?
@zkiiito - if you have a moment, perhaps you can check if PR #7125 provides creation_time and mtime is the way you expect, documentation on these is rather scarce. Thanks!
it looks good, thanks!