|
@@ -124,8 +124,8 @@ discard block |
|
|
block discarded – undo |
|
124
|
124
|
|
|
125
|
125
|
// Include instanceid in the prefix, in case multiple instances use the same cache (e.g. same FPM pool) |
|
126
|
126
|
$instanceid = $config->getValue('instanceid'); |
|
127
|
|
- $installedApps = implode(',', array_keys($versions)) . implode(',', array_values($versions)); |
|
128
|
|
- $this->globalPrefix = hash('xxh128', $instanceid . $installedApps); |
|
|
127
|
+ $installedApps = implode(',', array_keys($versions)).implode(',', array_values($versions)); |
|
|
128
|
+ $this->globalPrefix = hash('xxh128', $instanceid.$installedApps); |
|
129
|
129
|
} |
|
130
|
130
|
return $this->globalPrefix; |
|
131
|
131
|
} |
|
@@ -141,7 +141,7 @@ discard block |
|
|
block discarded – undo |
|
141
|
141
|
|
|
142
|
142
|
// Include instanceid in the prefix, in case multiple instances use the same cache (e.g. same FPM pool) |
|
143
|
143
|
$instanceid = \OCP\Server::get(SystemConfig::class)->getValue('instanceid'); |
|
144
|
|
- $this->globalPrefix = hash('xxh128', $instanceid . implode('.', $this->serverVersion->getVersion())); |
|
|
144
|
+ $this->globalPrefix = hash('xxh128', $instanceid.implode('.', $this->serverVersion->getVersion())); |
|
145
|
145
|
$closure($this); |
|
146
|
146
|
$this->globalPrefix = $backupPrefix; |
|
147
|
147
|
} |
|
@@ -153,7 +153,7 @@ discard block |
|
|
block discarded – undo |
|
153
|
153
|
* @return IMemcache |
|
154
|
154
|
*/ |
|
155
|
155
|
public function createLocking(string $prefix = ''): IMemcache { |
|
156
|
|
- $cache = new $this->lockingCacheClass($this->getGlobalPrefix() . '/' . $prefix); |
|
|
156
|
+ $cache = new $this->lockingCacheClass($this->getGlobalPrefix().'/'.$prefix); |
|
157
|
157
|
if ($this->lockingCacheClass === Redis::class) { |
|
158
|
158
|
if ($this->profiler->isEnabled()) { |
|
159
|
159
|
// We only support the profiler with Redis |
|
@@ -175,7 +175,7 @@ discard block |
|
|
block discarded – undo |
|
175
|
175
|
* @return ICache |
|
176
|
176
|
*/ |
|
177
|
177
|
public function createDistributed(string $prefix = ''): ICache { |
|
178
|
|
- $cache = new $this->distributedCacheClass($this->getGlobalPrefix() . '/' . $prefix); |
|
|
178
|
+ $cache = new $this->distributedCacheClass($this->getGlobalPrefix().'/'.$prefix); |
|
179
|
179
|
if ($this->distributedCacheClass === Redis::class) { |
|
180
|
180
|
if ($this->profiler->isEnabled()) { |
|
181
|
181
|
// We only support the profiler with Redis |
|
@@ -197,7 +197,7 @@ discard block |
|
|
block discarded – undo |
|
197
|
197
|
* @return ICache |
|
198
|
198
|
*/ |
|
199
|
199
|
public function createLocal(string $prefix = ''): ICache { |
|
200
|
|
- $cache = new $this->localCacheClass($this->getGlobalPrefix() . '/' . $prefix); |
|
|
200
|
+ $cache = new $this->localCacheClass($this->getGlobalPrefix().'/'.$prefix); |
|
201
|
201
|
if ($this->localCacheClass === Redis::class) { |
|
202
|
202
|
if ($this->profiler->isEnabled()) { |
|
203
|
203
|
// We only support the profiler with Redis |