src/Mouf/Database/TDBM/QueryFactory/FindObjectsFromSqlQueryFactory.php 1 location
|
@@ 195-204 (lines=10) @@
|
| 192 |
|
* |
| 193 |
|
* @return mixed |
| 194 |
|
*/ |
| 195 |
|
protected function fromCache(string $key, callable $closure) |
| 196 |
|
{ |
| 197 |
|
$item = $this->cache->fetch($key); |
| 198 |
|
if ($item === false) { |
| 199 |
|
$item = $closure(); |
| 200 |
|
$this->cache->save($key, $item); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
return $item; |
| 204 |
|
} |
| 205 |
|
} |
| 206 |
|
|
src/Mouf/Database/TDBM/TDBMService.php 1 location
|
@@ 1365-1374 (lines=10) @@
|
| 1362 |
|
* |
| 1363 |
|
* @return mixed |
| 1364 |
|
*/ |
| 1365 |
|
private function fromCache(string $key, callable $closure) |
| 1366 |
|
{ |
| 1367 |
|
$item = $this->cache->fetch($key); |
| 1368 |
|
if ($item === false) { |
| 1369 |
|
$item = $closure(); |
| 1370 |
|
$this->cache->save($key, $item); |
| 1371 |
|
} |
| 1372 |
|
|
| 1373 |
|
return $item; |
| 1374 |
|
} |
| 1375 |
|
|
| 1376 |
|
/** |
| 1377 |
|
* Returns the foreign key object. |