summaryrefslogtreecommitdiffstats
path: root/lib/private/config.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-02-10 17:21:15 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-02-10 17:21:15 +0100
commit11283c57d9bba055e881293d6958ac9d6033f928 (patch)
tree69970b356c567e58549747692ae6d2e570da35bd /lib/private/config.php
parentbd01ff135acb18d5be817ba153adaab9ac431782 (diff)
parent013feb8da052e7d8f2e1171fb6600d82b3c3ac29 (diff)
downloadnextcloud-server-11283c57d9bba055e881293d6958ac9d6033f928.tar.gz
nextcloud-server-11283c57d9bba055e881293d6958ac9d6033f928.zip
Merge pull request #11056 from AdamWill/9885-opcode
add function to invalidate one opcache file, use it if possible #9885
Diffstat (limited to 'lib/private/config.php')
-rw-r--r--lib/private/config.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/config.php b/lib/private/config.php
index 31e536221dd..5c8cc89f0f0 100644
--- a/lib/private/config.php
+++ b/lib/private/config.php
@@ -236,8 +236,11 @@ class Config {
flock($filePointer, LOCK_UN);
fclose($filePointer);
- // Clear the opcode cache
- \OC_Util::clearOpcodeCache();
+ // Try invalidating the opcache just for the file we wrote...
+ if (!\OC_Util::deleteFromOpcodeCache($this->configFilePath)) {
+ // But if that doesn't work, clear the whole cache.
+ \OC_Util::clearOpcodeCache();
+ }
}
}