mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 02:24:16 +02:00
[appimage] improvements -> database files only updated when expired
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import datetime
|
||||
import time
|
||||
from threading import Lock, Thread
|
||||
from typing import Optional
|
||||
|
||||
from bauh.api.abstract.cache import MemoryCache, MemoryCacheFactory
|
||||
|
||||
@@ -106,7 +107,7 @@ class DefaultMemoryCacheFactory(MemoryCacheFactory):
|
||||
self.expiration_time = expiration_time
|
||||
self.cleaner = cleaner
|
||||
|
||||
def new(self, expiration: int = None) -> MemoryCache:
|
||||
def new(self, expiration: Optional[int] = None) -> MemoryCache:
|
||||
instance = DefaultMemoryCache(expiration if expiration is not None else self.expiration_time)
|
||||
|
||||
if self.cleaner:
|
||||
|
||||
Reference in New Issue
Block a user