mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Applied rector with PHP8.1 migration rules
This commit is contained in:
parent
dc6a67c2f0
commit
7ee01d9a05
303 changed files with 1228 additions and 3465 deletions
|
@ -27,19 +27,18 @@ use Symfony\Contracts\Cache\TagAwareCacheInterface;
|
|||
final class SidebarTreeUpdater
|
||||
{
|
||||
private const CACHE_KEY = 'sidebar_tree_updated';
|
||||
private const TTL = 60 * 60 * 24; // 24 hours
|
||||
private const TTL = 60 * 60 * 24;
|
||||
|
||||
private CacheInterface $cache;
|
||||
|
||||
public function __construct(TagAwareCacheInterface $treeCache)
|
||||
public function __construct(
|
||||
// 24 hours
|
||||
private readonly TagAwareCacheInterface $cache
|
||||
)
|
||||
{
|
||||
$this->cache = $treeCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the time when the sidebar tree was updated the last time.
|
||||
* The frontend uses this information to reload the sidebar tree.
|
||||
* @return \DateTimeInterface
|
||||
*/
|
||||
public function getLastTreeUpdate(): \DateTimeInterface
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue