summaryrefslogtreecommitdiff
path: root/php.ini-development
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-07-16 21:14:57 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-07-17 19:51:07 +0200
commite2ed7e6716f9564fcd8b13b823519baaa7256662 (patch)
tree2bfb9548254d4b3e77e5741e8064094243b87930 /php.ini-development
parent6f617b7759a12c341a055de42e06717ebf905130 (diff)
downloadphp-git-e2ed7e6716f9564fcd8b13b823519baaa7256662.tar.gz
Allow multiple cache instances per user/host on Windows
Formerly, there was at most a single OPcache instance per user and the so called system ID (which is determined from the PHP version). Sometimes multiple OPcaches might be desired, though, particularly for unrelated CLI scripts, which may even be necessary (e.g. for our test suite in parallel mode). We therefore introduce a new INI directive `opcache.cache_id` which allows to configure independent OPcache instances for the same user. We also use `GetUserNameW()` instead of `php_win32_get_username()`, because the latter retrieves the user name encoded in the `default_charset`, which can obviously yield different results for different charsets, leading to OPcache "incompatibilities". Slightly worse, some characters may not even be encodeable in the `default_charset` and would be replaced by question marks, which could result in different users sharing the same OPcache. We also refactor, and re-use existing APIs to avoid duplicated code.
Diffstat (limited to 'php.ini-development')
-rw-r--r--php.ini-development4
1 files changed, 4 insertions, 0 deletions
diff --git a/php.ini-development b/php.ini-development
index eb30bd389e..fd96f43534 100644
--- a/php.ini-development
+++ b/php.ini-development
@@ -1851,6 +1851,10 @@ ldap.max_links = -1
; errors.
;opcache.mmap_base=
+; Facilitates multiple OPcache instances per user (for Windows only). All PHP
+; processes with the same cache ID and user share an OPcache instance.
+;opcache.cache_id=
+
; Enables and sets the second level cache directory.
; It should improve performance when SHM memory is full, at server restart or
; SHM reset. The default "" disables file based caching.