From 40d0bb0e4d7c1bb185ace227bdbe9a2d5a95439d Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 26 Oct 2021 16:47:06 +0200 Subject: [PATCH] fix caching --- docker/nginx/conf.d/server/server.dnslink | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/nginx/conf.d/server/server.dnslink b/docker/nginx/conf.d/server/server.dnslink index efaf314d..1dd3a489 100644 --- a/docker/nginx/conf.d/server/server.dnslink +++ b/docker/nginx/conf.d/server/server.dnslink @@ -27,11 +27,11 @@ location / { ngx.say(err or res.body) ngx.exit(ngx.status) end + else + ngx.var.skylink = res.body local cache_ttl = 300 -- 5 minutes cache expire time cache:set(ngx.var.host, ngx.var.skylink, cache_ttl) - else - ngx.var.skylink = res.body end else ngx.var.skylink = cache_value