aboutsummaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-05-04 04:48:40 +0200
committerKim Alvefur <zash@zash.se>2019-05-04 04:48:40 +0200
commitb3741ec9ef19f4cc5dfb0bbc5832d632339dadcc (patch)
treee4d34e263be5a93fe2d668d4cac68caab2b0bacb /net/http
parent6384747f765d7a443030b1886891980ea41ecf96 (diff)
downloadprosody-b3741ec9ef19f4cc5dfb0bbc5832d632339dadcc.tar.gz
prosody-b3741ec9ef19f4cc5dfb0bbc5832d632339dadcc.zip
net.http.files: Bump cache hits so they stay cached
It's not an LRU cache unless this is done.
Diffstat (limited to 'net/http')
-rw-r--r--net/http/files.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/http/files.lua b/net/http/files.lua
index 0b898dc6..090b15c8 100644
--- a/net/http/files.lua
+++ b/net/http/files.lua
@@ -94,6 +94,7 @@ local function serve(opts)
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 };