Skip to content

Commit 8ab30ee

Browse files
committed
chore: rename cache2
1 parent 1497212 commit 8ab30ee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/service.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use warp::fs::Conditionals;
1111
use crate::cors::{cors_resp, resp_cors_request, Validated};
1212
use crate::DomainStorage;
1313

14-
use crate::static_file_filter::{cache_or_file_reply, get_cache_file2};
14+
use crate::static_file_filter::{cache_or_file_reply, get_cache_file};
1515

1616

1717
pub struct ServiceConfig {
@@ -60,7 +60,7 @@ pub async fn create_service(req: Request<Body>, service_config: Arc<ServiceConfi
6060
}
6161
// static file
6262

63-
let mut resp = match get_cache_file2(req.uri().path(), host, domain_storage).await {
63+
let mut resp = match get_cache_file(req.uri().path(), host, domain_storage).await {
6464
Ok(item) => {
6565
let headers = req.headers();
6666
let conditionals = Conditionals {

server/src/static_file_filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ fn cache_item_to_response_header(
249249
}
250250
}
251251

252-
pub async fn get_cache_file2(tail:&str, host:&str, domain_storage:Arc<DomainStorage>) -> Result<(String, Arc<CacheItem>), Response<Body>> {
252+
pub async fn get_cache_file(tail:&str, host:&str, domain_storage:Arc<DomainStorage>) -> Result<(String, Arc<CacheItem>), Response<Body>> {
253253
let key = sanitize_path(tail).map(|s| {
254254
if s == "/" || s.is_empty() {
255255
"index.html".to_owned()

0 commit comments

Comments
 (0)