WIP on theme upload (#20)

This commit is contained in:
2022-07-24 16:32:37 -04:00
parent 81fe03b8f3
commit 0a32181e65
6 changed files with 66 additions and 53 deletions

View File

@@ -169,9 +169,10 @@ module TemplateCache =
}
/// Invalidate all template cache entries for the given theme ID
let invalidateTheme (themeId : string) =
let invalidateTheme (themeId : ThemeId) =
let keyPrefix = ThemeId.toString themeId
_cache.Keys
|> Seq.filter (fun key -> key.StartsWith themeId)
|> Seq.filter (fun key -> key.StartsWith keyPrefix)
|> List.ofSeq
|> List.iter (fun key -> match _cache.TryRemove key with _, _ -> ())