Skip to content

Commit

Permalink
fix: set TTL of 1h for get_logo_annotations function
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Dec 26, 2022
1 parent 844bfd3 commit 28e2505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion robotoff/logos.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def knn_search(
return []


@cachetools.cached(cachetools.LRUCache(maxsize=1))
@cachetools.cached(cachetools.TTLCache(maxsize=1, ttl=3600)) # 1h
def get_logo_annotations() -> dict[int, LogoLabelType]:
logger.info("Loading logo annotations from DB...")
annotations: dict[int, LogoLabelType] = {}
Expand Down

0 comments on commit 28e2505

Please sign in to comment.