Skip to content

Commit 3811fe6

Browse files
CleanMachine1MasterOdin
authored andcommitted
Change TLDR_CACHE_MAX_AGE default to one week (#170)
1 parent 67e52a9 commit 3811fe6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Cache is downloaded from `TLDR_DOWNLOAD_CACHE_LOCATION` (defaults to the one des
7777
* `TLDR_CACHE_ENABLED` (default is `1`):
7878
* If set to `1`, the client will first try to load from cache, and fall back to fetching from the internet if the cache doesn't exist or is too old.
7979
* If set to `0`, the client will fetch from the internet, and fall back to the cache if the page cannot be fetched from the internet.
80-
* `TLDR_CACHE_MAX_AGE` (default is `24`): maximum age of the cache in hours to be considered as valid when `TLDR_CACHE_ENABLED` is set to `1`.
80+
* `TLDR_CACHE_MAX_AGE` (default is `168` hours, which is equivalent to a week): maximum age of the cache in hours to be considered as valid when `TLDR_CACHE_ENABLED` is set to `1`.
8181

8282
#### Cache location
8383

tldr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
USE_NETWORK = int(os.environ.get('TLDR_NETWORK_ENABLED', '1')) > 0
3434
USE_CACHE = int(os.environ.get('TLDR_CACHE_ENABLED', '1')) > 0
35-
MAX_CACHE_AGE = int(os.environ.get('TLDR_CACHE_MAX_AGE', 24))
35+
MAX_CACHE_AGE = int(os.environ.get('TLDR_CACHE_MAX_AGE', 24*7))
3636

3737
URLOPEN_CONTEXT = None
3838
if int(os.environ.get('TLDR_ALLOW_INSECURE', '0')) == 1:

0 commit comments

Comments
 (0)