@@ -114,7 +114,7 @@ zend_bool accel_startup_ok = 0;
114
114
static char * zps_failure_reason = NULL ;
115
115
char * zps_api_failure_reason = NULL ;
116
116
zend_bool file_cache_only = 0 ; /* process uses file cache only */
117
- zend_bool no_cache = 0 ; /* process does not use any cache (takes precedence over file_cache_only) */
117
+ zend_bool allow_cache = 1 ; /* process does not use any cache (takes precedence over file_cache_only) */
118
118
#if ENABLE_FILE_CACHE_FALLBACK
119
119
zend_bool fallback_process = 0 ; /* process uses file cache fallback */
120
120
#endif
@@ -470,7 +470,7 @@ zend_string* ZEND_FASTCALL accel_new_interned_string(zend_string *str)
470
470
uint32_t pos , * hash_slot ;
471
471
zend_string * s ;
472
472
473
- if (UNEXPECTED (file_cache_only || no_cache )) {
473
+ if (UNEXPECTED (file_cache_only || ! allow_cache )) {
474
474
return str ;
475
475
}
476
476
@@ -1952,7 +1952,7 @@ zend_op_array *file_cache_compile_file(zend_file_handle *file_handle, int type)
1952
1952
zend_op_array * no_cache_compile_file (zend_file_handle * file_handle , int type )
1953
1953
{
1954
1954
zend_op_array * op_array = NULL ;
1955
- zend_persistent_script * persistent_script ; // not actually persistent with opcache.no_cache .
1955
+ zend_persistent_script * persistent_script ; // not actually persistent with opcache.allow_cache=0 .
1956
1956
1957
1957
if (is_stream_path (file_handle -> filename ) &&
1958
1958
!is_cacheable_stream_path (file_handle -> filename )) {
@@ -2007,14 +2007,14 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2007
2007
ZCG (cache_persistent_script ) = NULL ;
2008
2008
if (file_handle -> filename
2009
2009
&& ZCG (enabled ) && accel_startup_ok ) {
2010
- if (no_cache ) {
2010
+ if (! allow_cache ) {
2011
2011
return no_cache_compile_file (file_handle , type );
2012
2012
} else if (ZCG (accel_directives ).file_cache ) {
2013
2013
return file_cache_compile_file (file_handle , type );
2014
2014
}
2015
2015
}
2016
2016
return accelerator_orig_compile_file (file_handle , type );
2017
- } else if (no_cache ) {
2017
+ } else if (! allow_cache ) {
2018
2018
// TODO: Why is opcache_get_status using accelerator_enabled instead of enabled?
2019
2019
ZCG (cache_opline ) = NULL ;
2020
2020
ZCG (cache_persistent_script ) = NULL ;
@@ -2344,7 +2344,7 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
2344
2344
/* zend_resolve_path() replacement for PHP 5.3 and above */
2345
2345
static zend_string * persistent_zend_resolve_path (const char * filename , size_t filename_len )
2346
2346
{
2347
- if (!file_cache_only && ! no_cache &&
2347
+ if (!file_cache_only && allow_cache &&
2348
2348
ZCG (accelerator_enabled )) {
2349
2349
2350
2350
/* check if callback is called from include_once or it's a main request */
@@ -2468,7 +2468,7 @@ int accel_activate(INIT_FUNC_ARGS)
2468
2468
ZCG (cwd_key_len ) = 0 ;
2469
2469
ZCG (cwd_check ) = 1 ;
2470
2470
2471
- if (file_cache_only || no_cache ) {
2471
+ if (file_cache_only || ! allow_cache ) {
2472
2472
ZCG (accelerator_enabled ) = 0 ;
2473
2473
return SUCCESS ;
2474
2474
}
@@ -3028,8 +3028,8 @@ static int accel_post_startup(void)
3028
3028
/* End of non-SHM dependent initializations */
3029
3029
/********************************************/
3030
3030
file_cache_only = ZCG (accel_directives ).file_cache_only ;
3031
- no_cache = ZCG (accel_directives ).no_cache ;
3032
- if (!file_cache_only && ! no_cache ) {
3031
+ allow_cache = ZCG (accel_directives ).allow_cache ;
3032
+ if (!file_cache_only && allow_cache ) {
3033
3033
size_t shm_size = ZCG (accel_directives ).memory_consumption ;
3034
3034
#ifdef HAVE_JIT
3035
3035
size_t jit_size = 0 ;
@@ -3181,7 +3181,7 @@ static int accel_post_startup(void)
3181
3181
3182
3182
zend_optimizer_startup ();
3183
3183
3184
- if (!file_cache_only && ! no_cache && ZCG (accel_directives ).interned_strings_buffer ) {
3184
+ if (!file_cache_only && allow_cache && ZCG (accel_directives ).interned_strings_buffer ) {
3185
3185
accel_use_shm_interned_strings ();
3186
3186
}
3187
3187
@@ -3199,7 +3199,7 @@ void accel_shutdown(void)
3199
3199
{
3200
3200
zend_ini_entry * ini_entry ;
3201
3201
zend_bool _file_cache_only = 0 ;
3202
- zend_bool _no_cache = 0 ;
3202
+ zend_bool _allow_cache = 1 ;
3203
3203
3204
3204
#ifdef HAVE_JIT
3205
3205
zend_jit_shutdown ();
@@ -3221,15 +3221,15 @@ void accel_shutdown(void)
3221
3221
}
3222
3222
3223
3223
_file_cache_only = file_cache_only ;
3224
- _no_cache = no_cache ;
3224
+ _allow_cache = allow_cache ;
3225
3225
3226
3226
accel_reset_pcre_cache ();
3227
3227
3228
3228
#ifdef ZTS
3229
3229
ts_free_id (accel_globals_id );
3230
3230
#endif
3231
3231
3232
- if (!_file_cache_only && ! _no_cache ) {
3232
+ if (!_file_cache_only && _allow_cache ) {
3233
3233
/* Delay SHM detach - this only needs to be done if SHM is used */
3234
3234
orig_post_shutdown_cb = zend_post_shutdown_cb ;
3235
3235
zend_post_shutdown_cb = accel_post_shutdown ;
@@ -4820,8 +4820,8 @@ static int accel_finish_startup(void)
4820
4820
}
4821
4821
4822
4822
if (ZCG (accel_directives ).preload && * ZCG (accel_directives ).preload ) {
4823
- if (no_cache ) {
4824
- zend_accel_error (ACCEL_LOG_ERROR , "Preloading cannot be combined with no_cache " );
4823
+ if (! allow_cache ) {
4824
+ zend_accel_error (ACCEL_LOG_ERROR , "Preloading cannot be combined with allow_cache=0 " );
4825
4825
return FAILURE ;
4826
4826
}
4827
4827
#ifdef ZEND_WIN32
@@ -4847,8 +4847,8 @@ static int accel_finish_startup(void)
4847
4847
zend_bool old_reset_signals = SIGG (reset );
4848
4848
#endif
4849
4849
4850
- if (UNEXPECTED (no_cache )) {
4851
- zend_accel_error (ACCEL_LOG_WARNING , "Preloading doesn't work in \"no_cache \" mode" );
4850
+ if (UNEXPECTED (! allow_cache )) {
4851
+ zend_accel_error (ACCEL_LOG_WARNING , "Preloading doesn't work in \"allow_cache=0 \" mode" );
4852
4852
return SUCCESS ;
4853
4853
}
4854
4854
if (UNEXPECTED (file_cache_only )) {
0 commit comments