I am using Yii 1.1.12 and recently upgraded my PHP from 5.3 to 5.5 and have found that APC is no longer to be used because OpCache has been made part of PHP5.5. In my Yii main.config file, I have the following entry:
'cache'=>array(
'class'=>'system.caching.CApcCache',
),
Two questions:
Yii::app()->cache->set('some data to be cached', $CACHE_VARIABLES); $get_var=Yii::app()->cache->get($CACHE_VARIABLES);
Output of PhpInfo shows following Zend Opcache variables (Local and Master values are mentioned in front of each varaible:
Zend OPcache
Opcode Caching Up and Running
Optimization Enabled
Startup OK
Shared memory model win32
Cache hits 731
Cache misses 144
Used memory 4487992
Free memory 62545312
Wasted memory 75560
Cached scripts 138
Cached keys 261
Max keys 3907
OOM restarts 0
Hash keys restarts 0
Manual restarts 0
opcache.blacklist_filename no value no value
opcache.consistency_checks 0 0
opcache.dups_fix Off Off
opcache.enable On On
opcache.enable_cli On On
opcache.enable_file_override Off Off
opcache.error_log no value no value
opcache.fast_shutdown 0 0
opcache.file_update_protection 2 2
opcache.force_restart_timeout 180 180
opcache.inherited_hack On On
opcache.interned_strings_buffer 4 4
opcache.load_comments 0 0
opcache.log_verbosity_level 1 1
opcache.max_accelerated_files 2000 2000
opcache.max_file_size 0 0
opcache.max_wasted_percentage 5 5
opcache.memory_consumption 64 64
opcache.mmap_base no value no value
opcache.optimization_level 0xFFFFFFFF 0xFFFFFFFF
opcache.preferred_memory_model no value no value
opcache.protect_memory 0 0
opcache.restrict_api no value no value
opcache.revalidate_freq 2 2
opcache.revalidate_path Off Off
opcache.save_comments 0 0
opcache.use_cwd On On
opcache.validate_timestamps On On
Thanks.