File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ Cache is downloaded from `TLDR_DOWNLOAD_CACHE_LOCATION` (defaults to the one des
77
77
* ` TLDR_CACHE_ENABLED ` (default is ` 1 ` ):
78
78
* 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.
79
79
* 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 ` ): maximum age of the cache in hours to be considered as valid when ` TLDR_CACHE_ENABLED ` is set to ` 1 ` .
81
81
82
82
#### Cache location
83
83
Original file line number Diff line number Diff line change 30
30
'https://tldr-pages.github.io/assets/tldr.zip'
31
31
)
32
32
33
- USE_NETWORK = int (os .environ .get ('TLDR_NETWORK_ENABLED' , '1' )) > 0
34
- USE_CACHE = int (os .environ .get ('TLDR_CACHE_ENABLED' , '1' )) > 0
35
- MAX_CACHE_AGE = int (os .environ .get ('TLDR_CACHE_MAX_AGE' , 24 ) )
33
+ USE_NETWORK = int (os .environ .get ('TLDR_NETWORK_ENABLED' , '1' )) > 0 # Defaults to True
34
+ USE_CACHE = int (os .environ .get ('TLDR_CACHE_ENABLED' , '1' )) > 0 # Defaults to True
35
+ MAX_CACHE_AGE = int (os .environ .get ('TLDR_CACHE_MAX_AGE' , 168 )) # Defaults to 168 hours (a week )
36
36
37
37
URLOPEN_CONTEXT = None
38
38
if int (os .environ .get ('TLDR_ALLOW_INSECURE' , '0' )) == 1 :
You can’t perform that action at this time.
0 commit comments