Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(handler) do not use cache with dbless when looking up service for route #8972

Merged
merged 1 commit into from
Jun 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kong/runloop/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,13 @@ do
local err

-- kong.core_cache is available, not in init phase
if kong.core_cache then
if kong.core_cache and db.strategy ~= "off" then
local cache_key = db.services:cache_key(service_pk.id, nil, nil, nil, nil,
route.ws_id)
service, err = kong.core_cache:get(cache_key, TTL_ZERO,
load_service_from_db, service_pk)

else -- init phase, kong.core_cache not available
else -- dbless or init phase: kong.core_cache not needed/available

-- A new service/route has been inserted while the initial route
-- was being created, on init (perhaps by a different Kong node).
Expand Down