[tech] Questions about cache

colecmac at protonmail.com colecmac at protonmail.com
Thu Dec 24 20:12:23 GMT 2020


> On an Amfora-related note: makeworld talked about the caching on
> IRC the other day, and another user brought up that it seemed like
> Amfora presented cached content when a previously-visited link was
> clicked. Makeworld commented that this was unintended, and said they
> would fix it for a later release. (At least that’s how I remember it;
> maybe makeworld can weigh in.)


Wow, a lot of talk about Amfora in this thread. I'll respond to this, and
some other things.

What I remember from that IRC conversation was that another user (probably bie)
said that Amfora was using the cache, not when a link was clicked, but when
it was typed in the bottom bar. This should not be happening in my opinion,
but it is. I've opened an issue to address this, and yes, it will be fixed
in the next release.

https://github.com/makeworld-the-better-one/amfora/issues/159


>From Stephane's original email:

> So I was a bit surprised when I was putting together some dynamic
> content for my capsule and found that my client (amfora) was caching
> things. I was able to get around it by using temporary redirects to add
> cache busting query strings.

Amfora does not use the cache for redirects. That is, if the server redirects
the client to a cached page, Amfora will not use the cache to load that page.
The code for this change can be seen here:

https://github.com/makeworld-the-better-one/amfora/commit/b05885e7100a18fb7afae5d388173b7795c274ec

So if your dynamic content was using redirects already, it should be okay.


nytpu wrote:

> Looking at the Amfora code, it seems like there's 3 limits to the
> cache[1]: number of pages, size in bytes, and number of seconds. This
> seems to be configurable[2],and it looks like it *should* (I may be
> misreading the code) hard reload the page when you refresh a tab[3].

All correct. There are some other things that disable cache as well. Redirects,
and client certs. Any page that Amfora sends a client cert to will not
be cached, and this helps with dynamic apps like Astrobotany.


It sounds like the consensus in this thread is that Amfora should not be
using the cache when the user "clicks" a link. I suppose that makes sense,
but I find that for a lot of cases using the cache improves the browsing
experience. Most content on Gemini is static, and so it's nice when the page
loads instantly, it really makes a noticeable difference, despite how fast
Gemini is.

I'm not quite sure what to do here, as I don't want to break apps, but I
want browsing static content to be nice as well. Thoughts?

Cheers,
makeworld


More information about the Gemini mailing list