summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Core/Provider/MetadataCache.hs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Hakyll/Core/Provider/MetadataCache.hs b/src/Hakyll/Core/Provider/MetadataCache.hs
index 077bad2..031960c 100644
--- a/src/Hakyll/Core/Provider/MetadataCache.hs
+++ b/src/Hakyll/Core/Provider/MetadataCache.hs
@@ -8,7 +8,7 @@ module Hakyll.Core.Provider.MetadataCache
--------------------------------------------------------------------------------
import qualified Data.Map as M
-
+import Control.Monad (unless)
--------------------------------------------------------------------------------
import Hakyll.Core.Identifier
@@ -49,12 +49,8 @@ resourceInvalidateMetadataCache p r = do
--------------------------------------------------------------------------------
load :: Provider -> Identifier -> IO ()
load p r = do
- mmd <- Store.get store mdk :: IO (Store.Result Metadata)
- case mmd of
- -- Already loaded
- Store.Found _ -> return ()
- -- Not yet loaded
- _ -> do
+ mmof <- Store.isMember store mdk
+ unless mmof $ do
(md, body) <- loadMetadata p r
Store.set store mdk md
Store.set store bk body