From 9dcebe61ea1d422c84c0a63a67a3223984d549fd Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 05:40:40 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes Allow users to bypass caching --- src/forgejo.rs | 6 +++--- src/github.rs | 8 ++++---- src/gitlab.rs | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/forgejo.rs b/src/forgejo.rs index b0f4df209e..13b5830ac5 100644 --- a/src/forgejo.rs +++ b/src/forgejo.rs @@ -1,7 +1,7 @@ use crate::cache::{CacheManager, CacheManagerBuilder}; use crate::config::Settings; use crate::tokens; -use crate::{dirs, duration, env}; +use crate::{dirs, env}; use eyre::Result; use heck::ToKebabCase; use reqwest::IntoUrl; @@ -47,7 +47,7 @@ async fn get_releases_cache(key: &str) -> RwLockReadGuard<'_, CacheGroup(key: &str) -> RwLockReadGuard<'a, CacheGroup RwLockReadGuard<'_, CacheGroup .entry(key.to_string()) .or_insert_with(|| { CacheManagerBuilder::new(cache_dir().join(format!("{key}-tags.msgpack.z"))) - .with_fresh_duration(Some(duration::DAILY)) + .with_fresh_duration(Settings::get().fetch_remote_versions_cache()) .build() }); TAGS_CACHE.read().await @@ -105,7 +105,7 @@ async fn get_releases_cache(key: &str) -> RwLockReadGuard<'_, CacheGroup(key: &str) -> RwLockReadGuard<'a, CacheGroup RwLockReadGuard<'_, CacheGroup .entry(key.to_string()) .or_insert_with(|| { CacheManagerBuilder::new(cache_dir().join(format!("{key}-tags.msgpack.z"))) - .with_fresh_duration(Some(duration::DAILY)) + .with_fresh_duration(Settings::get().fetch_remote_versions_cache()) .build() }); TAGS_CACHE.read().await @@ -82,7 +82,7 @@ async fn get_releases_cache(key: &str) -> RwLockReadGuard<'_, CacheGroup RwLockReadGuard<'_, CacheGroup