File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,10 @@ protected function getGlobalPrefix(): string {
119119 $ versions = $ appConfig ->getAppInstalledVersions ();
120120 }
121121 $ versions ['core ' ] = implode ('. ' , $ this ->serverVersion ->getVersion ());
122- $ this ->globalPrefix = hash ('xxh128 ' , implode (', ' , $ versions ));
122+
123+ // Include instanceid in the prefix, in case multiple instances use the same cache (e.g. same FPM pool)
124+ $ instanceid = $ config ->getSystemValue ('instanceid ' );
125+ $ this ->globalPrefix = hash ('xxh128 ' , $ instanceid . implode (', ' , $ versions ));
123126 }
124127 return $ this ->globalPrefix ;
125128 }
@@ -132,7 +135,10 @@ protected function getGlobalPrefix(): string {
132135 */
133136 public function withServerVersionPrefix (\Closure $ closure ): void {
134137 $ backupPrefix = $ this ->globalPrefix ;
135- $ this ->globalPrefix = hash ('xxh128 ' , implode ('. ' , $ this ->serverVersion ->getVersion ()));
138+
139+ // Include instanceid in the prefix, in case multiple instances use the same cache (e.g. same FPM pool)
140+ $ instanceid = \OCP \Server::get (SystemConfig::class)->getSystemValue ('instanceid ' );
141+ $ this ->globalPrefix = hash ('xxh128 ' , $ instanceid . implode ('. ' , $ this ->serverVersion ->getVersion ()));
136142 $ closure ($ this );
137143 $ this ->globalPrefix = $ backupPrefix ;
138144 }
You can’t perform that action at this time.
0 commit comments