Cache content (Primary S3 super slow)

How do I configure nginx/redis/opcache to cache content under say 25KB indefinitely?

Basically the primary S3 works fast once the primary site is loaded but it takes upwards of 15-25 seconds for the initial loading.

If neither of these are possible is there a way to speed up S3 requests in nextcloud? I’m pretty sure the slow loading isn’t due to a hardware limitation but a limitation on nextcloud not making fast enough requests.