APCIterator::__construct

(PECL apc >= 3.1.1)

APCIterator::__construct锟斤拷锟斤拷一锟斤拷 APCIterator 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷

说锟斤拷

public APCIterator::__construct ( string $cache [, mixed $search = NULL [, int $format = APC_ITER_ALL [, int $chunk_size = 100 [, int $list = APC_LIST_ACTIVE ]]]] )

锟斤拷锟斤拷一锟斤拷 APCIterator object.

锟斤拷锟斤拷

cache

锟斤拷锟斤拷锟斤拷锟酵o拷锟斤拷锟斤拷锟斤拷 user 锟斤拷锟斤拷 file锟斤拷

search

匹锟斤拷 APC 锟斤拷锟斤拷锟斤拷 PCRE 锟斤拷锟斤拷锟斤拷式锟斤拷锟饺匡拷锟斤拷锟角碉拷锟斤拷锟斤拷锟斤拷锟斤拷式 string锟斤拷也锟斤拷锟斤拷锟斤拷 array 锟斤拷锟斤拷锟斤拷锟斤拷式锟斤拷锟斤拷锟竭匡拷锟斤拷锟斤拷 NULL 锟斤拷锟皆癸拷锟斤拷锟斤拷锟斤拷

format

锟斤拷要锟侥革拷式锟斤拷锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷 APC_ITER_* 锟斤拷锟斤拷锟斤拷

chunk_size

锟斤拷拇锟叫★拷锟斤拷锟斤拷锟斤拷锟揭伙拷锟斤拷锟斤拷锟�0锟斤拷值锟斤拷默锟斤拷锟斤拷100锟斤拷

list

锟斤拷要锟叫筹拷锟斤拷锟斤拷锟酵★拷锟斤拷锟斤拷锟斤拷 APC_LIST_ACTIVE 锟斤拷 APC_LIST_DELETED锟斤拷

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 APCIterator object锟斤拷失锟斤拷时锟斤拷锟斤拷 NULL锟斤拷

锟斤拷锟斤拷

Example #1 APCIterator::__construct() 锟斤拷锟斤拷

<?php
foreach (new APCIterator('user''/^counter\./') as $counter) {
    echo 
"$counter[key]$counter[value]\n";
    
apc_dec($counter['key'], $counter['value']);
}
?>

锟轿硷拷

  • apc_exists() - 锟斤拷锟紸PC锟斤拷锟角凤拷锟斤拷锟侥筹拷锟斤拷锟斤拷锟侥承﹌ey
  • apc_cache_info() - Retrieves cached information from APC's data store