karpetrosyan / hishel

An elegant HTTP Cache implementation for HTTPX and HTTP Core.
https://hishel.com
BSD 3-Clause "New" or "Revised" License
148 stars 18 forks source link

Default TTL? #202

Open Ravencentric opened 5 months ago

Ravencentric commented 5 months ago

The docs don't explicity say what's the default TTL and looking at the code all I can find is None. Does None imply here that it's kept as long as it's not stale?

karpetrosyan commented 5 months ago

Hi!

ttl is simply a limitation for the response to live in our storages; if it is None, which is the normal behavior, it can remain in our storages until the controller decides to remove it.

You are right, we definitely need to mention that in the docs.

Ravencentric commented 5 months ago

Understood, thank you!

Simon-Will commented 2 months ago

Hey, I created a trivial PR for this in #250.

Simon-Will commented 2 months ago

I think this can be closed. I forgot to use the "Closes X" in the PR.