mirror of
https://github.com/chubin/wttr.in
synced 2025-01-12 12:08:47 +00:00
increased cache expiry time
This commit is contained in:
parent
4a980be2f3
commit
5e3ecaeaf4
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ def _cache_file(path, query):
|
||||||
|
|
||||||
digest = hashlib.sha1(("%s %s" % (path, query)).encode("utf-8")).hexdigest()
|
digest = hashlib.sha1(("%s %s" % (path, query)).encode("utf-8")).hexdigest()
|
||||||
digest_number = ord(digest[0].upper())
|
digest_number = ord(digest[0].upper())
|
||||||
expiry_interval = 60*(digest_number+30)
|
expiry_interval = 60*(digest_number+40)
|
||||||
|
|
||||||
timestamp = "%010d" % (int(time.time())//expiry_interval*expiry_interval)
|
timestamp = "%010d" % (int(time.time())//expiry_interval*expiry_interval)
|
||||||
filename = os.path.join(PROXY_CACHEDIR, timestamp, path, query)
|
filename = os.path.join(PROXY_CACHEDIR, timestamp, path, query)
|
||||||
|
|
Loading…
Reference in a new issue