Vuex sets the time to save data

how vuex sets a time when saving data to empty vuex data. Go to the API again to get the latest data and save it. Ask for the answer of the Great God

Mar.30,2021

through a watch timestamp, the timestamp is incremented. To change the store, when the critical value is reached, I just provide an idea. I don't know if there is a better way


vuex does not have such API

talk about your requirements, it's possible that this implementation idea is unreasonable in the first place.

if you have to use it, I suggest you write a judgment logic in vuex's getter to determine whether the current data is invalid.
if the implementation sends a request, no data is returned. You can understand it as the middleware of vuex. well, yes, it's middleware

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-1b303f3-2bd00.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-1b303f3-2bd00.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?