How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
10 plus years* active enterprise development experience and a Fine art degree 🎨
You can also use the disk if you don't want to setup Redis and if you have access to the file system.
A cache is a cache. There are advantages and disadvantages on each cache but you can totally start with a json file on disk and then move on something more scalable if you need to.
The principle is the same, replace Redis with the file. Keep in mind that you need to cleanup the cache manually at some point, though one file per day isn't too much
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It seems what you're asking is a normal cache. Get the response, put it in a Redis instance and set a 24h expiration time.
From your web app get the cached data, if the cache is empty, go back to the API, get the response, fill the cache and serve it to the client.
It could be as simple as that.
Sounds about right, I have implemented something close to this idea in a JSON cache where file names are dated.
You can also use the disk if you don't want to setup Redis and if you have access to the file system.
A cache is a cache. There are advantages and disadvantages on each cache but you can totally start with a json file on disk and then move on something more scalable if you need to.
The principle is the same, replace Redis with the file. Keep in mind that you need to cleanup the cache manually at some point, though one file per day isn't too much