When learning new things, I often encounter some problems that I cannot solve at the time. I want to record them and understand them in depth, but I will always forget them. So, right! This article is a pitfall! Leave it blank!
Problem description:
Using the swift API, perform the show account and list container operations under a certain number of objects and container accounts. The returned results contain the number of container and the name of the container, however, the number of bytes occupied by the container and the number of objects are both 0.
However, after uploading a file, the correct result is displayed after performing the preceding operations. (It is not a definite result, but it is not 0)
Guess:
Count, calculate used bytes operations all need to traverse the information in the account, the efficiency is relatively low, swift in order to speed up the response will not every time the statistics, instead, the cache is used for statistics maintenance.
Therefore, the first access time is 0. After the upload, there is information in the cache, so some results are returned.
Wait for subsequent read source code verification...