mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-18 06:28:11 -07:00
computer: refactor
This commit is contained in:
@@ -82,7 +82,7 @@ fn req_to_response_res(
|
||||
|
||||
let guard_res = cache.get_value_or_guard(
|
||||
&format!("{}{}{etag}", uri.path(), uri.query().unwrap_or("")),
|
||||
Some(Duration::from_millis(500)),
|
||||
Some(Duration::from_millis(50)),
|
||||
);
|
||||
|
||||
let mut response = if let GuardResult::Value(v) = guard_res {
|
||||
|
||||
@@ -88,7 +88,7 @@ fn path_to_response_(headers: &HeaderMap, app_state: &AppState, path: &Path) ->
|
||||
let guard_res = if !must_revalidate {
|
||||
Some(app_state.cache.get_value_or_guard(
|
||||
&path.to_str().unwrap().to_owned(),
|
||||
Some(Duration::from_millis(500)),
|
||||
Some(Duration::from_millis(50)),
|
||||
))
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user