I have a SvelteKit app running on a web service and I believe I’m having an issue with Render aggressively caching my pages during deployment.
Here is what I’m seeing in the deploy logs:
Apr 16 10:46:15 PM 302 / -> /login
Apr 16 10:46:15 PM 302 /associations -> /login
Apr 16 10:46:15 PM 302 /artifacts -> /login
Apr 16 10:46:15 PM 302 /places -> /login
Apr 16 10:46:15 PM 302 /items -> /login
Apr 16 10:46:15 PM 302 /races -> /login
Apr 16 10:46:15 PM 302 /npcs -> /login
The reason that they are all redirecting to the login page is because the app redirects there, server side, for an unauthenticated user. The login page, in turn, redirects to /
for an authenticated user. So, when an authenticated user hits my home page, render is redirecting them to /login
based on the cache created on deployment (I believe), which then redirects to /
, and back and forth ad infinitum.
I might expect such an aggressive cache on a 301 redirect, but given that I’m returning 302s this seems excessive. Is there a way I can turn off or change that caching?