Skip to content

Commit

Permalink
chore: adding debug logging for repository_lookup cache key(PROJQUAY-…
Browse files Browse the repository at this point in the history
…6472) (quay#2610)

log: adding debug logging for repository_lookup cache key(PROJQUAY-6472)
  • Loading branch information
Sunandadadi authored Jan 16, 2024
1 parent e243d23 commit 88168d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/cache/cache_key.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import logging
from collections import namedtuple

logger = logging.getLogger(__name__)


class CacheKey(namedtuple("CacheKey", ["key", "expiration"])):
"""
Expand Down Expand Up @@ -80,4 +83,5 @@ def for_repository_lookup(namespace_name, repo_name, manifest_ref, kind_filter,
if kind_filter is not None:
cache_key = f"{cache_key}_{kind_filter}"

logger.debug(f"Loading repository lookup from cache_key: {cache_key}")
return CacheKey(cache_key, cache_ttl)

0 comments on commit 88168d0

Please sign in to comment.