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
|
@@ 1499-1508 (lines=10) @@
|
| 1496 |
|
* |
| 1497 |
|
* @return mixed |
| 1498 |
|
*/ |
| 1499 |
|
private function fromCache(string $key, callable $closure) |
| 1500 |
|
{ |
| 1501 |
|
$item = $this->cache->fetch($key); |
| 1502 |
|
if ($item === false) { |
| 1503 |
|
$item = $closure(); |
| 1504 |
|
$this->cache->save($key, $item); |
| 1505 |
|
} |
| 1506 |
|
|
| 1507 |
|
return $item; |
| 1508 |
|
} |
| 1509 |
|
|
| 1510 |
|
/** |
| 1511 |
|
* Returns the foreign key object. |