Skip to content
Open
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 asu/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def get_redis_client(unicode: bool = True) -> redis.client.Redis:
return redis.from_url(settings.redis_url, decode_responses=unicode)


def client_get(url: str) -> Response:
def client_get(url: str, ttl: int = 3600) -> Response:
return hishel.CacheClient(
storage=hishel.RedisStorage(client=get_redis_client(False)),
storage=hishel.RedisStorage(client=get_redis_client(False), ttl=ttl),
controller=hishel.Controller(always_revalidate=True, allow_heuristics=True),
).get(url)

Expand Down