I'm working on rails project in which I'm using turbolinks.
When a user clicks a link, I'd like to be able to check if Turbolinks has a cache for the page the user is going to. If it's not cached, I'd like to display a loading spinner.
I've checked the docs and looked into the data on the different Turbolinks events, but I haven't been able to find a way to do this.
Is there a way I can do this check?
Any help would be greatly appreciated.
I found using Turbolinks.controller.cache.snapshots
gives a list of all cache snapshots.