How To Best Save The Results Of A Search To The Database

I am trying to improve the UX of my app so that when the user goes to a page and goes BACK to the previous page with a long 10 second search process that the results of the initial search are saved to the database and readily available so it can be pulled up in 1-2 seconds MAX.

How should I go about setting this up efficiently?

You could save the initial result as a list of things each time one is performed (you could store it in a state or in the db if it needs to be persistent). Then load that list by default when the user goes back from the next page.