rss-bridge/lib/CacheInterface.php
Dag 6254b8593e
refactor(cache): extract and encapsulate cache expiration logic (#3547)
* refactor(cache): extract and encapsulate cache expiration logic

* fix: logic bug in getSimpleHTMLDOMCached

* fix: silly me, index should of course be on the key column

* silly me again, PRIMARY keys get index by default lol

* comment out the delete portion in loadData

* remove a few log statements

* tweak twitter cache timeout
2023-07-19 05:05:49 +02:00

16 lines
330 B
PHP

<?php
interface CacheInterface
{
public function setScope(string $scope): void;
public function setKey(array $key): void;
public function loadData(int $timeout = 86400);
public function saveData($data): void;
public function getTime(): ?int;
public function purgeCache(int $timeout = 86400): void;
}