CodePudding user response:
Said to you before, I do my shopping cart method, you can consult, our shopping cart is achieved by redis, you say, we'll give each selected goods add a CheckBox logo, each time to cancel, selected will operate redis will not query the database directly, there is no much consumed, when placing orders only needs to query have chosen logo of product line, but at the time of order we will update price from a database, because the price may be will change during the period ofCodePudding user response:
The browser's cache to try, like dangdangCodePudding user response:
If don't want to use the query, you can use the in keyword query, select * from the TAB where id in (', ')CodePudding user response:
Can be used to cache of commodity information, Redis as a cache efficientCan have a look at the official documentation first
https://docs.spring.io/spring/docs/5.2.2.RELEASE/spring-framework-reference/integration.html#cache
Look at this demo
https://github.com/xkcoding/spring-boot-demo/tree/master/spring-boot-demo-cache-redis