I have a Crystal 0.34.0 / Kemal 0.26.1 site running on Heroku. I recently added caching of data and views using a Redis backend. This works great, though it’s only activated as-needed.
I was wondering if I should pre-load the cahe, using fibers, whenever Kemal starts up, since Heroku does a daily restart of the dyno?
Is this a good idea, or am I missing any fiber-related “gotchas”?
I’m assuming Kemal stays running all day until Heroku does a restart. So, my cache preloading would occur in the top of my main Kemal .cr file. Unless Kemal executes that per every request. In that case I’d need access to some Kemal-related block which only executes once upon initial startup.