Software /
code /
prosody
Diff
net/http/files.lua @ 9996:9bb1bed3e8e3
net.http.files: Bump cache hits so they stay cached
It's not an LRU cache unless this is done.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 May 2019 04:48:40 +0200 |
parent | 9949:a39f3681d685 |
child | 10061:5c71693c8345 |
line wrap: on
line diff
--- a/net/http/files.lua Sat May 04 04:33:41 2019 +0200 +++ b/net/http/files.lua Sat May 04 04:48:40 2019 +0200 @@ -94,6 +94,7 @@ if data and data.etag == etag then response_headers.content_type = data.content_type; data = data.data; + cache:get(orig_path, data); elseif attr.mode == "directory" and path then if full_path:sub(-1) ~= "/" then local dir_path = { is_absolute = true, is_directory = true };