I'm using Oracle database in my Node.js application and in a query I am fetching around 30k records. It's taking time. Can someone suggest me if there is any possibility to implement cache for this?
Example: Fetching cities of United states in a dropdown.
Not related to caching, but you might probably want to consider streams for such huge numbers.
Marco Alka
Software Engineer, Technical Consultant & Mentor
Instead of caching for a dropdown, you might benefit from implementing a search field. Because 30k records in a dropdown will be slow in the browser as well; and sending all that data to mobile clients will make them leave your site (it's slow and you use up all their mobile data).
If you really need so many records, use streaming, just as @peek4y already said.
If you have to cache, you might want to store everything to memory or at least to a local memory-based database (redis, for example) and update the cache every one day, depending on your requirements.