Skip to content

Commit

Permalink
Fix issues with cache flushing
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcclure committed Oct 11, 2021
1 parent 0e86b34 commit 16b87d1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lib/Launchpad/App/Launchpad.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
}

if (this.isSetup && this.Config["flush_cache_on_exit"]) {
this.Service("CacheManager").FlushCaches(false)
this.Service("CacheManager").FlushCaches(false, false)
}

super.ExitApp()
Expand Down
2 changes: 1 addition & 1 deletion Lib/Launchpad/Gui/Form/SettingsWindow.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
} else if (btn == "OpenCacheDir") {
this.app.Service("CacheManager").OpenCacheDir()
} else if (btn == "FlushCacheDir") {
this.app.Service("CacheManager").FlushCaches()
this.app.Service("CacheManager").FlushCaches(true, true)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Lib/Launchpad/Gui/ManageWindow/MainWindow.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
} else if (result == "ManageBackups") {
this.app.Service("GuiManager").OpenWindow("ManageBackupsWindow")
} else if (result == "FlushCache") {
this.app.Service("CacheManager").FlushCaches()
this.app.Service("CacheManager").FlushCaches(true, true)
} else if (result == "CleanLaunchers") {
this.app.Service("BuilderManager").CleanLaunchers()
} else if (result == "ReloadLaunchers") {
Expand Down
2 changes: 1 addition & 1 deletion Lib/Shared/Volantis.App/Cache/FileCache.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class FileCache extends CacheBase {
}
}

FlushCacheAction() {
FlushCacheAction(force := false) {
if (DirExist(this.cachePath)) {
DirDelete(this.cachePath, true)
}
Expand Down
2 changes: 1 addition & 1 deletion Lib/Shared/Volantis.App/Cache/ObjectCache.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ObjectCache extends CacheBase {
this.cacheObj.Delete(key)
}

FlushCacheAction() {
FlushCacheAction(force := false) {
this.cacheObj := Map()
return true
}
Expand Down

0 comments on commit 16b87d1

Please sign in to comment.