I have one approach which we use in our organization.
→ Create service to load the database data in IS using IS built in
storage services and make it startup service.
→ Fetch the data using key-value pair using storage service.
Tried this approach. In designer, the results get displayed in service Results immediately. But, it takes so much time like around 2 minutes to give full result set.
Manikumars approach is not really helping here (especially when using storage services), as storage is also database based.
It is stored in the internal database structure in the ISInternal section.
It needs to be explicitly updated when content is to be changed and it can lead to locking issues if not used correctly.
I would prefer to use pub.cache-services instead which are available from wM 9.5 SP1 onwards
These will even work without having Terracotta in place. but they are caching in memory, which will be refreshed at least upon each restart of IS.