download: use new etag cache file and delete the old one, this removes all the old themezer entries.

This commit is contained in:
ITotalJustice
2025-08-31 01:48:27 +01:00
parent 9c65e5a12d
commit 62f48353ba
2 changed files with 5 additions and 4 deletions

View File

@@ -1495,9 +1495,10 @@ App::App(const char* argv0) {
} }
{ {
// delete old themezer cache as themezer does not exit anymore. // delete old cached folders/files on startup.
SCOPED_TIMESTAMP("themezer cache delete"); SCOPED_TIMESTAMP("old cache delete");
m_fs->DeleteDirectoryRecursively("/switch/sphaira/cache/themezer"); m_fs->DeleteDirectoryRecursively("/switch/sphaira/cache/themezer"); // themezer icon/json cache.
m_fs->DeleteFile("/switch/sphaira/cache/cache.json"); // old etag cache.
} }
if (log_is_init()) { if (log_is_init()) {

View File

@@ -247,7 +247,7 @@ private:
} }
} }
static constexpr inline fs::FsPath JSON_PATH{"/switch/sphaira/cache/cache.json"}; static constexpr inline fs::FsPath JSON_PATH{"/switch/sphaira/cache/etag_v2.json"};
static constexpr inline const char* ETAG_STR{"etag"}; static constexpr inline const char* ETAG_STR{"etag"};
static constexpr inline const char* LAST_MODIFIED_STR{"last-modified"}; static constexpr inline const char* LAST_MODIFIED_STR{"last-modified"};