diff options
author | 2023-07-19 05:05:49 +0200 | |
---|---|---|
committer | 2023-07-19 05:05:49 +0200 | |
commit | 6254b8593e2f7636db65db23c1228482e38be44f (patch) | |
tree | f30cb00666c8231e741b1151aba84eb338702e98 /lib/CacheInterface.php | |
parent | 087e790ec10d287f944e3abeb5ab3bda9a1a045a (diff) | |
download | rss-bridge-6254b8593e2f7636db65db23c1228482e38be44f.tar.gz rss-bridge-6254b8593e2f7636db65db23c1228482e38be44f.tar.zst rss-bridge-6254b8593e2f7636db65db23c1228482e38be44f.zip |
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
Diffstat (limited to 'lib/CacheInterface.php')
-rw-r--r-- | lib/CacheInterface.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CacheInterface.php b/lib/CacheInterface.php index 414a9c84..85aa830f 100644 --- a/lib/CacheInterface.php +++ b/lib/CacheInterface.php @@ -6,11 +6,11 @@ interface CacheInterface public function setKey(array $key): void; - public function loadData(); + public function loadData(int $timeout = 86400); public function saveData($data): void; public function getTime(): ?int; - public function purgeCache(int $seconds): void; + public function purgeCache(int $timeout = 86400): void; } |