如何将忽略参数传递给磁盘缓存中的记忆缓存?
未解决的忽略参考= {threshold_days,folder_path}
import diskcache as dc
from datetime import datetime
cache = dc.Cache()
#Unresolved Reference ignore={threshold_days, folder_path}
@dc.Cache().memoize(tag='runoncetoday', ignore={threshold_days, folder_path})
def delete_olddata_func(day_today):
### run file deleteion function only once at the start of the day and skip it when called again on the same day .
pass
day_today = datetime.now().date()
threshold_days= 25
folder_path = "/myDir"
delete_olddata_func(day_today=day_today, threshold_days=threshold_days, folder_path = folder_path )
from diskcache import Cache
cache = Cache('/path/to/cache')
@cache.memoize(ttl=60, ignore=['threshold_days', 'folder_path'])
def my_function(threshold_days, folder_path, other_arg):
#function implementation
pass