Created
September 22, 2021 09:26
-
-
Save dsyme/2d9e54551db8292cafad43387202d1b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace DesignTime | |
module ABC = | |
let checkLocalCache() = | |
async { | |
while true do | |
try | |
do! Async.Sleep(10min) | |
let files = ... // get lis of current files in cache | |
let fileOrder = ... // sort files in last accessed order | |
let filesToDelete - ... // work out what to delete | |
// delete the files | |
with err -> | |
printfn "unexpected error in background cahce check, continuing: %A" err | |
} | |
checkLocalCache() |> Async.Start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment