Yac::dumpDump cache entries for inspection 説明
public array Yac::dump(int
$limit = 100, int $offset = 0)Dumps metadata of the entries currently stored in the cache. The values themselves are not returned. パラメータ
戻り値An array with one element per dumped entry. Each element is itself an array describing the entry:
例例1 Yac::dump example 上の例の出力は、 たとえば以下のようになります。
Array
(
[0] => Array
(
[index] => 12345
[hash] => 14463105906481965911
[crc] => 0
[ttl] => 0
[k_len] => 3
[v_len] => 3
[size] => 0
[atime] => 1725955200
[hits] => 0
[embedded] => 1
[key] => foo
)
[1] => Array
(
[index] => 12987
[hash] => 15132029420525657053
[crc] => 0
[ttl] => 0
[k_len] => 3
[v_len] => 3
[size] => 0
[atime] => 1725955200
[hits] => 0
[embedded] => 1
[key] => baz
)
)
Entries are listed in slot order, not in the order they were stored.
Embedded entries (short scalars kept inside the slot itself) have
例2 Paging through a large cache
上の例の出力は、 たとえば以下のようになります。 int(100) Fewer entries than requested are returned when the cache holds fewer entries than the requested page covers, and an empty array is returned once the offset points past the last occupied slot. 参考
|