aboutsummaryrefslogtreecommitdiffstats
path: root/app/Cache.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Cache.hs')
-rw-r--r--app/Cache.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/Cache.hs b/app/Cache.hs
index 52d18ca..7af9ee7 100644
--- a/app/Cache.hs
+++ b/app/Cache.hs
@@ -6,7 +6,6 @@ where
import Data.Binary (Binary, decodeFileOrFail, encodeFile)
import Data.Text qualified as T
-import Debug
import Git qualified
import System.Directory (createDirectoryIfMissing, doesFileExist)
import System.FilePath ((</>))
@@ -19,13 +18,13 @@ cached key func = do
doesFileExist file >>= \case
True ->
decodeFileOrFail file >>= \case
- Left e -> debug "e" e `seq` generate file
+ Left _ -> generate file
Right blob -> pure blob
False -> generate file
where
generate file = do
blob <- func
- encodeFile (debug "cache miss" file) blob
+ encodeFile file blob
pure blob
cachedMaybe :: Binary a => Maybe T.Text -> IO a -> IO a