Kong full table cache at service start

Is there any way in Kong to cache all the records in the table at the start/restart of the kong service? If yes, how this can be done?

We are writing a custom plugin for kong and we want to perform some task at the start of kong service. Is there any trigger/method which we can execute in the custom plugin at the start of kong service?

You can implement init_worker phase in your plugin, and possibly execute ngx.timer.at(0, function() ... end) to gain access to co-sockets from init_worker.