htb_cli/cli/cache.rs
1use clap::Subcommand;
2
3use crate::cache::Cache;
4use crate::output;
5
6#[derive(Subcommand)]
7pub enum CacheCommand {
8 /// Remove all cached responses
9 Clear,
10}
11
12pub fn handle(cmd: CacheCommand, cache: &Cache) {
13 match cmd {
14 CacheCommand::Clear => {
15 cache.clear();
16 output::print_message("Cache cleared.");
17 }
18 }
19}