When does Mini Program use setStorage and when does setStorageSync? use?

when does Mini Program use setStorage and when does setStorageSync? use?

Mar.05,2021

Synchronize asynchronism. Synchronize means that your next operation must be completed in the previous step before it can be executed. Async means that the following code has nothing to do with this operation. How to choose your code logic, whether the following operations need memory must be saved, because the operation of memory is time-consuming, often not as fast as the code.


the former is an asynchronous operation, and the latter is a Synchronize operation. If the subsequent operation depends on changing the data after storage, Synchronize is required, otherwise the subsequent operation will still use unupdated data. If the subsequent operations do not need to use the changed storage data, then do not need to immediately Synchronize, then use asynchronous operation to save memory.

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