Facing slow load times with Next.js caching for dynamic blogs, the author designed a custom caching system that serves content instantly, updates in the background, and forces a refresh after a month of inactivity. The blog's storage was also migrated to an S3 proxy and miniserve for efficient file distribution, with edge caching set to six hours. After initial concerns, the system has been running smoothly for two weeks. The author also notes progress on the riscv-mc emulator project.
Continuing from #7, the built-in caching in NextJS wasn't a good fit for my dynamic blogs, pages are loading painfully slowl. So I stayed up late, designed and implemented my own version. It avoids making requests for a certain period of time, and then starts making background requests as visits, so we can still see the content without delay. Finally, it forces a request when nobody has visited it for about a month. I also added the last updated feature from Gist, so it’s even faster.


