aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index eb5ef06..767d5ee 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -340,9 +340,19 @@ fn run() -> MainResult<()> {
.default_value("buildtemplate.png")
.takes_value(true),
)
+ .arg(
+ Arg::with_name("no-cache")
+ .help("Disables the cache")
+ .long("no-cache")
+ .takes_value(false),
+ )
.get_matches();
- let mut api = Api::new(cache::FileCache::new());
+ let mut api = if matches.is_present("no-cache") {
+ Api::new(cache::NoopCache::new())
+ } else {
+ Api::new(cache::FileCache::new())
+ };
let build = if matches.is_present("chatlink") {
run_chatlink(&mut api, &matches)?
} else {