What is the best way to load the cache before rendering whole plugin

I have to create local cache on starting of app what would be the best way to do that