(string $rel)
| 433 | } |
| 434 | |
| 435 | private function getListCache(string $rel): ?array |
| 436 | { |
| 437 | if (!isset($this->listCache[$rel])) { |
| 438 | return null; |
| 439 | } |
| 440 | $entry = $this->listCache[$rel]; |
| 441 | $ts = (int)($entry['ts'] ?? 0); |
| 442 | if ($ts <= 0 || (time() - $ts) > $this->listCacheTtl) { |
| 443 | unset($this->listCache[$rel]); |
| 444 | return null; |
| 445 | } |
| 446 | $children = $entry['children'] ?? null; |
| 447 | return is_array($children) ? $children : null; |
| 448 | } |
| 449 | |
| 450 | private function storeListCache(string $rel, array $children): void |
| 451 | { |