From 9219e0b364f3548c5ac253e5ceadcad1b2bf51bf Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 18 Dec 2019 12:39:47 +0000 Subject: [PATCH] full cache lifecycle --- src/main.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3a5b688..263ddcc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,9 +40,10 @@ fn begin(cache: State, msg: Json) -> Json, + msg: Json, +) -> String { + cache_state + .lock() + .expect("wanted cache to be lockable") + .remove(&msg.game.id); + + "OK".to_string() +} + #[post("/move", format = "json", data = "")] fn make_move( cache_state: State,