mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-12 23:14:43 +02:00
refacor: improve cache interface (#3492)
* fix: proper typehint on setScope * refactor: type hint setKey() * typehint
This commit is contained in:
parent
f8801d8cb3
commit
caac7f572c
13 changed files with 56 additions and 220 deletions
|
@ -39,6 +39,10 @@ class SetBridgeCacheAction implements ActionInterface
|
|||
|
||||
$cache = $cacheFactory->create();
|
||||
$cache->setScope(get_class($bridge));
|
||||
if (!is_array($key)) {
|
||||
// not sure if $key is an array when it comes in from request
|
||||
$key = [$key];
|
||||
}
|
||||
$cache->setKey($key);
|
||||
$cache->saveData($value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue