Skip to content

Commit b80c9dc

Browse files
committed
MC-6273: Mysql url_rewrite select make on product view page 170+ times per request
- changes after CR
1 parent d2e5a19 commit b80c9dc

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

app/code/Magento/Config/App/Config/Type/System.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ private function loadAllData()
231231
return $this->lockQuery->lockedLoadData(
232232
self::$lockName,
233233
$loadAction,
234-
[$this, 'readData'],
235-
[$this, 'cacheData']
234+
\Closure::fromCallable([$this, 'readData']),
235+
\Closure::fromCallable([$this, 'cacheData'])
236236
);
237237
}
238238

@@ -256,8 +256,8 @@ private function loadDefaultScopeData($scopeType)
256256
return $this->lockQuery->lockedLoadData(
257257
self::$lockName,
258258
$loadAction,
259-
[$this, 'readData'],
260-
[$this, 'cacheData']
259+
\Closure::fromCallable([$this, 'readData']),
260+
\Closure::fromCallable([$this, 'cacheData'])
261261
);
262262
}
263263

@@ -295,8 +295,8 @@ private function loadScopeData($scopeType, $scopeId)
295295
return $this->lockQuery->lockedLoadData(
296296
self::$lockName,
297297
$loadAction,
298-
[$this, 'readData'],
299-
[$this, 'cacheData']
298+
\Closure::fromCallable([$this, 'readData']),
299+
\Closure::fromCallable([$this, 'cacheData'])
300300
);
301301
}
302302

lib/internal/Magento/Framework/Cache/LockGuardedCacheLoader.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ public function __construct(
5252
}
5353

5454
/**
55-
* @inheritdoc
55+
* Load data.
56+
*
57+
* @param string $lockName
58+
* @param callable $dataLoader
59+
* @param callable $dataCollector
60+
* @param callable $dataSaver
61+
* @return array
5662
*/
5763
public function lockedLoadData(
5864
string $lockName,

0 commit comments

Comments
 (0)