The author first confirms that by calling the inventory of a single drug through the interface, can you check it all in 2 minutes? If so, it is better to use Redis to save such frequent IO operations first, and then make a scheduled task and insert it into the database later.
I don’t quite understand the requirements, so I can only give you a reference:
1. If you have permission to modify the pharmacy database:
2. If you do not have the right to modify the pharmacy database:
The author first confirms that by calling the inventory of a single drug through the interface, can you check it all in 2 minutes? If so, it is better to use Redis to save such frequent IO operations first, and then make a scheduled task and insert it into the database later.