opcache.file_cache_read_only

INIAdded in PHP 8.5

opcache: opcache.file_cache_read_only — Enables or disables read-only mode for the second level cache directory. It should improve performance for read-only containers, when the cache is pre-warmed and packaged alongside the application. Best used with opcache.validate_timestamps=0, opcache.enable_file_override=1 and opcache.file_cache_consistency_checks=0. Note: A cache generated with a different build of PHP, a different file path, or different settings (including which extensions are loaded), may be ignored.

Default value 0
Development value 0
Production value 0

Modifiability: INI_SYSTEM - The opcache.file_cache_read_only INI directive directive is a system-directive, and can only be configured in php.ini files or Server-API configuration files such as Apache httpd.conf. It cannot be configured with ini_set calls.

PHP 5
PHP 7
PHP 8.0
PHP 8.1-8.2
PHP 8.3
PHP 8.4
PHP 8.5
Added
[opcache]
opcache.file_cache_read_only = 0

Changes to the opcache.file_cache_read_only INI

PHP 8.5

  • INI directive added

opcache.file_cache_read_only INI Availability

PHP VersionAvailability
PHP 8.5Upcoming Release Yes
PHP 8.4Supported (Latest) No
PHP 8.3Supported No
PHP 8.2Security-Fixes Only No
PHP 8.1Security-Fixes Only No
PHP 8.0Unsupported No
PHP 7.4Unsupported No
PHP 7.3Unsupported No
PHP 7.2Unsupported No
PHP 7.1Unsupported No
PHP 7.0Unsupported No
PHP 5.6Unsupported No
PHP 5.5Unsupported No
PHP 5.4Unsupported No
PHP 5.3Unsupported No