網(wǎng)上搜索基本的都是說這個目錄的內(nèi)容不會被刪除涣脚,只是不會被icloud備份而已。
之前的同事將數(shù)據(jù)庫放到了Library/Cache目錄凑兰,之前只是覺得有點奇怪掌桩,也沒太在意,于是我就背鍋了票摇。生產(chǎn)環(huán)境偶爾出現(xiàn)用戶數(shù)據(jù)全丟的情況拘鞋,發(fā)現(xiàn)是數(shù)據(jù)庫被刪除了。再查一下官方文檔:
屏幕快照 2018-03-27 下午4.54.29.png
大家別被網(wǎng)上其他文章誤導(dǎo)了矢门。
附上官方文檔地址:
https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW1