aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/downloader/file_downloader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/downloader/file_downloader.rs')
-rw-r--r--crates/shirabe/src/downloader/file_downloader.rs25
1 files changed, 13 insertions, 12 deletions
diff --git a/crates/shirabe/src/downloader/file_downloader.rs b/crates/shirabe/src/downloader/file_downloader.rs
index b03db38..66f3390 100644
--- a/crates/shirabe/src/downloader/file_downloader.rs
+++ b/crates/shirabe/src/downloader/file_downloader.rs
@@ -124,18 +124,19 @@ impl FileDownloader {
{
// PHP: writeError('Running cache garbage collection', true, io_interface::VERY_VERBOSE)
this.io.write_error("Running cache garbage collection");
- cache.borrow_mut().gc(
- this.config
- .borrow_mut()
- .get("cache-files-ttl")
- .as_int()
- .unwrap_or(0),
- this.config
- .borrow_mut()
- .get("cache-files-maxsize")
- .as_int()
- .unwrap_or(0),
- );
+ let ttl = this
+ .config
+ .borrow_mut()
+ .get("cache-files-ttl")
+ .as_int()
+ .unwrap_or(0);
+ let max_size = this
+ .config
+ .borrow_mut()
+ .get("cache-files-maxsize")
+ .as_int()
+ .unwrap_or(0);
+ cache.borrow_mut().gc(ttl, max_size);
}
this