using this simple config:
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
if_modified_since Off;
lua_check_client_abort On;
resolver 127.0.0.1;
lua_package_path '/opt/ledge/lua-ffi-zlib/lib/?.lua;/opt/ledge/lua-resty-http/lib/?.lua;/opt/ledge/lua-resty-redis-connector/lib/?.lua;/opt/ledge/lua-resty-qless/lib/?.lua;/opt/ledge/lua-resty-cookie/lib/?.lua;/opt/ledge/ledge/lib/?.lua;;';
init_by_lua_block {
local ledge_m = require "ledge.ledge"
ledge = ledge_m.new()
ledge:config_set("upstream_host", "<ip>")
ledge:config_set("redis_host", { host = "<ip>", port = 6379, password = pass, socket = nil})
}
init_worker_by_lua_block {
ledge:run_workers()
}
server {
location / {
content_by_lua_block {
ledge:config_set("cache_key_spec", { ngx.var.host, ngx.var.uri, ngx.var.args })
ledge:run()
}
}
}
}
no matter what I do I always getting cache miss, its like never putting anything into redis