I have a Web Part that connects to a SQL server and pulls summary data for the current user. (Think "dashboard".) Unfortunately this query is expensive to run so I'd like to cache the results to improve performance.
My first idea was to run the query for all users and populate a table in SQL. The SQL server would run a scheduled task to periodically refresh the data.
My other thought was to make a view from the query and populate a SharePoint External List. I can do this, but the database is queried on every display.
So, my question: is there a simple way to have SharePoint cache the results of the query for x minutes? Or, is there another best SharePoint-centric best practice for what I'm trying to achieve?