VUE obtains data through the network, how to store the duck?

encountered a problem through vue"s nuxt framework. For example, I have a Home (home page), modules such as module rotation chart, album, recommendation, hotspot, user basic information and so on. We know that each module has data. For example, I use axios to get the data. I use axios to get the data, but I don"t know where to get the data. Should I get the data from the carousel component or the global Home page?

< H2 > the main concern is that < / H2 >
  • if Http, is called in each module, it seems that there are too many http requests
  • if you get data in the page, although there are not many http requests, it is a bit difficult to understand. It seems that something is wrong and troublesome for a component to pass data down. Look for vuex, at night if the data is all in vuex, it seems that the data is a bit big, a picture base64 is very large, even if you don"t store base64, and only store the necessary information, it is also very huge. Especially unlimited drop-down refresh data, always drop down the browser will jam the duck.
Dec.09,2021

1. If the home groupware is used, each component calls its own data. If there is no sub-component, it is called in the home. There are many http requests, so you can consider letting the backend merge the request
2. Those data do not need to be stored, and the interface is adjusted every time, only the user login information is stored
3. You can take a look at Cache-Control this thing

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b41d1f-2bd3f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b41d1f-2bd3f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?