summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolderpunk <solderpunk@sdf.org>2020-09-01 23:27:59 +0200
committerSolderpunk <solderpunk@sdf.org>2020-09-01 23:27:59 +0200
commitba0f707669e5bdf8b9470f3cb758132fef2b788a (patch)
tree9564069a7d21545227eae146f4ec917700c52471
parent67f9c662b3bde5e614a0e92ad14f37403aab5e99 (diff)
Ignore the cache when reloading a page.
-rwxr-xr-xav98.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/av98.py b/av98.py
index dcd6659..1df3a7d 100755
--- a/av98.py
+++ b/av98.py
@@ -307,7 +307,7 @@ class GeminiClient(cmd.Cmd):
(hostname text, address text, fingerprint text,
first_seen date, last_seen date, count integer)""")
- def _go_to_gi(self, gi, update_hist=True, handle=True):
+ def _go_to_gi(self, gi, update_hist=True, check_cache=True, handle=True):
"""This method might be considered "the heart of AV-98".
Everything involved in fetching a gemini resource happens here:
sending the request over the network, parsing the response if
@@ -335,7 +335,7 @@ you'll be able to transparently follow links to Gopherspace!""")
return
# Use cache, or hit the network if resource is not cached
- if self.options["cache"] and self._is_cached(gi.url):
+ if check_cache and self.options["cache"] and self._is_cached(gi.url):
mime, body, tmpfile = self._get_cached(gi.url)
else:
try:
@@ -1235,7 +1235,7 @@ you'll be able to transparently follow links to Gopherspace!""")
@needs_gi
def do_reload(self, *args):
"""Reload the current URL."""
- self._go_to_gi(self.gi)
+ self._go_to_gi(self.gi, check_cache=False)
@needs_gi
def do_up(self, *args):