improve get_stale usage docs

This commit is contained in:
Karol Wypchlo 2021-12-20 16:55:14 +01:00
parent 871712c3f8
commit d34366aefc
No known key found for this signature in database
GPG Key ID: C92C016317A964D0
1 changed files with 3 additions and 2 deletions

View File

@ -46,8 +46,9 @@ function _M.is_blocked(skylink)
-- hash skylink before comparing it with blocklist -- hash skylink before comparing it with blocklist
local hash = require("skynet.skylink").hash(skylink) local hash = require("skynet.skylink").hash(skylink)
-- we need to use get stale because we're using expiring when updating blocklist -- we need to use get_stale because we are expiring previous
-- and we want to make sure that we're blocking the skylink -- entries when the blocklist is reloading and we still want
-- to block them until the reloading is finished
return ngx.shared.blocklist:get_stale(hash) == true return ngx.shared.blocklist:get_stale(hash) == true
end end