2009年12月22日星期二

Re: [fw-mvc] Zend Cache Apc troubles

Hi Pieter,

Next time I'll clicking 'reply all' I swear to you :)

so the nitty-gritty

I've run the apc.php on the server

General Cache Information

APC Version3.0.19
PHP Version5.2.6-1+lenny4
APC Hostxxxxxxx (xxxxx) (92.xxxxx)
Server SoftwareApache/2.2.9 (Debian)
Shared Memory1 Segment(s) with 30.0 MBytes
(mmap memory, pthread mutex locking)
Start Time2009/12/22 19:49:05
Uptime 0 minutes
File Upload Support1

File Cache Information

Cached Files1 (288.3 KBytes)
Hits1
Misses1
Request Rate (hits, misses)2.00 cache requests/second
Hit Rate1.00 cache requests/second
Miss Rate1.00 cache requests/second
Insert Rate1.00 cache requests/second
Cache full count0

User Cache Information

Cached Variables0 ( 0.0 Bytes)
Hits0
Misses0
Request Rate (hits, misses)0.00 cache requests/second
Hit Rate0.00 cache requests/second
Miss Rate0.00 cache requests/second
Insert Rate0.00 cache requests/second
Cache full count0

Runtime Settings

It seems that APC caching is enabled, doesn't it

Pieter Kokx wrote:
Are you sure that APC caching is enabled? Does APC caching without Zend_Cache work (like described in http://php.net/apc )? And next time, would you bother clicking on 'reply all', so the mailing list is also added? -- Best Regards, Pieter Kokx PHP Developer Zend Framework developer whisher@mp4.it schreef: > Hi Pieter, > Well actually it doesn't cache anything :( > if I use Apc while it works (do cache) > with File. > Regards, > Bye. > > > --- Messaggio originale --- > Hi, > > How exactly do you mean with 'this doesn't work'? Doesn't it cache > anything or what? > > Regards, > > Pieter Kokx > PHP Developer > Zend Framework developer > > > > whisher schreef: > > Hi. > > I don't understand why this works with File > > doesn't work with with Apc > > protected function _initCache() > > { > > $dir = Zend_Registry::get('dir'); > > $frontendOptions = array( > > 'caching'=> true, > > 'cache_id_prefix' => null, > > 'lifetime' => 7200, > > 'logging' => false, > > 'write_control'=> true, > > 'automatic_serialization' => true, > > 'automatic_cleaning_factor' => 10, > > 'ignore_user_abort'=> false, > > ); > > $backendOptions = array( > > 'cache_dir' => $dir->cache > > ); > > $cache = Zend_Cache::factory('Core', 'File', $frontendOptions, > > $backendOptions); > > //$cache = Zend_Cache::factory('Core', 'Apc', $frontendOptions); > > Zend_Registry::set('cache', $cache); > > > > } > > > > In the model > > public function fetchItems($lang) > > { > > $cache = Zend_Registry::get('cache'); > > if(!$data = $cache->load('RightFetchTags')) { > > // do select > > $data = $table->fetchAll($select)->toArray(); > > $cache->save($data, 'RightFetchTags'); > > } > > return $data; > > } > > > > Bye > > > > > > > --- Dada Music Movement , tutta la musica che > vuoi! ---


View this message in context: Re: Zend Cache Apc troubles
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论:

 
apc.cache_by_default1
apc.coredump_unmap0
apc.enable_cli0
apc.enabled1
apc.file_update_protection2
apc.filters
apc.gc_ttl3600
apc.include_once_override0
apc.max_file_size1M
apc.mmap_file_mask
apc.num_files_hint1000
apc.report_autofilter0
apc.rfc18670
apc.rfc1867_freq0
apc.rfc1867_nameAPC_UPLOAD_PROGRESS
apc.rfc1867_prefixupload_
apc.shm_segments1
apc.shm_size30
apc.slam_defense0
apc.stat1
apc.stat_ctime0
apc.ttl0
apc.user_entries_hint4096
apc.user_ttl0
apc.write_lock1