summaryrefslogtreecommitdiff
path: root/src/mod_magnet_cache.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-02-02 23:24:22 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-02-02 23:28:38 -0500
commitb1df38ab6ace9c622af553815bdedb2c02685f44 (patch)
tree922768613735cb604088b0fdbefc59f9c87175e7 /src/mod_magnet_cache.c
parent2496c1af4cab4c8f4875543525763efa0733653d (diff)
downloadlighttpd-git-b1df38ab6ace9c622af553815bdedb2c02685f44.tar.gz
[core] increase stat_cache abstraction
reduce dependency on struct connection routines for getting/caching content_type and etag separate from stat
Diffstat (limited to 'src/mod_magnet_cache.c')
-rw-r--r--src/mod_magnet_cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_magnet_cache.c b/src/mod_magnet_cache.c
index 1f8de572..1260f665 100644
--- a/src/mod_magnet_cache.c
+++ b/src/mod_magnet_cache.c
@@ -75,6 +75,7 @@ lua_State *script_cache_get_script(server *srv, connection *con, script_cache *c
break;
}
+ stat_cache_etag_get(sce, con->etag_flags);
if (!buffer_is_equal(sce->etag, sc->etag)) {
/* the etag is outdated, reload the function */
lua_pop(sc->L, 1);
@@ -118,7 +119,7 @@ lua_State *script_cache_get_script(server *srv, connection *con, script_cache *c
}
if (HANDLER_GO_ON == stat_cache_get_entry(srv, con, sc->name, &sce)) {
- buffer_copy_buffer(sc->etag, sce->etag);
+ buffer_copy_buffer(sc->etag, stat_cache_etag_get(sce, con->etag_flags));
}
force_assert(lua_isfunction(sc->L, -1));