src/Mouf/Database/TDBM/QueryFactory/FindObjectsFromSqlQueryFactory.php 1 location
|
@@ 190-199 (lines=10) @@
|
| 187 |
|
* |
| 188 |
|
* @return mixed |
| 189 |
|
*/ |
| 190 |
|
protected function fromCache(string $key, callable $closure) |
| 191 |
|
{ |
| 192 |
|
$item = $this->cache->fetch($key); |
| 193 |
|
if ($item === false) { |
| 194 |
|
$item = $closure(); |
| 195 |
|
$this->cache->save($key, $item); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
return $item; |
| 199 |
|
} |
| 200 |
|
} |
| 201 |
|
|
src/Mouf/Database/TDBM/TDBMService.php 1 location
|
@@ 1481-1490 (lines=10) @@
|
| 1478 |
|
* |
| 1479 |
|
* @return mixed |
| 1480 |
|
*/ |
| 1481 |
|
private function fromCache(string $key, callable $closure) |
| 1482 |
|
{ |
| 1483 |
|
$item = $this->cache->fetch($key); |
| 1484 |
|
if ($item === false) { |
| 1485 |
|
$item = $closure(); |
| 1486 |
|
$this->cache->save($key, $item); |
| 1487 |
|
} |
| 1488 |
|
|
| 1489 |
|
return $item; |
| 1490 |
|
} |
| 1491 |
|
|
| 1492 |
|
/** |
| 1493 |
|
* Returns the foreign key object. |