I have a requirement where my application needs to query redis to get the cache value. And redis cache should be populated with the values got by making a HTTP call to a different API endpoint. And these values should be available before my application starts up.
And when the data in my external API changes i'll be getting an event, using which I need to update the cache in my redis server with new value.
- Is there a way in redis server itself which I can use to solve this requirement, by making redis get the value during startup and listen to an event to detect changes.
- Or, should I rely on an external process to populate and update the redis cache.