Skip to content

Commit

Permalink
Insert cached item back after checking out.
Browse files Browse the repository at this point in the history
  • Loading branch information
cryscan committed Nov 2, 2023
1 parent aab9e06 commit f54f3bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ where
.with_chunk_size(STATE_CHUNK_SIZE)
.build_backed()
});
if len > 0 {
let key = Tokens(prefix.clone());
cache.insert(key, reload.clone());
}
(prefix, reload)
};

Expand Down Expand Up @@ -407,7 +411,7 @@ where

if let Some(backed) = match &slots[batch] {
SlotState::Idle(content, _) => {
log::info!("manually backed slot {}", batch);
log::info!("backed slot {}", batch);
let backed = self.state.back_batch(batch).expect("back state");
cache.insert(content.clone(), backed.clone());
Some(backed)
Expand Down

0 comments on commit f54f3bf

Please sign in to comment.