As always, something always pisses in my cheerios…
This time it was the language loader that loads the language catalog for use in Javascript, turns out that sometimes that will sit there spinning it’s little wheels for 10 seconds. I expressly don’t cache it via CloudFlare in order to make sure that when updates are published, I don’t have to go in and selectively tell CF to purge stuff.
Solved that one another way; when a request is made to the language catalog URL, it generates the catalog, then writes the entire bunch of Javascript that comes out to disk. With a little try_files magic in nginx, if the file happens to exist on disk, nginx will serve it directly from disk. If it doesn’t exist, it’ll hit up the backend which will render the content and store it on disk so nginx can get to it after.
It’s noticeably faster…


More...