on master help sign in
Don't cache pageCompilerWithFields
3a4f1d1Jasper Van der Jeugt
src/Hakyll/Web/Page.hs+7−5
@@ -109,8 +109,12 @@ pageCompilerWith state options = pageCompilerWithPandoc state options id
109pageCompilerWithPandoc :: ParserState -> WriterOptions
109pageCompilerWithPandoc :: ParserState -> WriterOptions
110 -> (Pandoc -> Pandoc)
110 -> (Pandoc -> Pandoc)
111 -> Compiler Resource (Page String)
111 -> Compiler Resource (Page String)
112−pageCompilerWithPandoc state options f =
112+pageCompilerWithPandoc state options f = cached cacheName $
113− pageCompilerWithFields state options f id
113+ readPageCompiler >>> addDefaultFields >>> arr applySelf
114+ >>> pageReadPandocWith state
115+ >>> arr (fmap (writePandocWith options . f))
116+ where
117+ cacheName = "Hakyll.Web.Page.pageCompilerWithPandoc"
114
118
115-- | This is another, even more advanced version of 'pageCompilerWithPandoc'.
119-- | This is another, even more advanced version of 'pageCompilerWithPandoc'.
116-- This function allows you to provide an arrow which is applied before the
120-- This function allows you to provide an arrow which is applied before the
@@ -121,12 +125,10 @@ pageCompilerWithFields :: ParserState -> WriterOptions
121 -> (Pandoc -> Pandoc)
125 -> (Pandoc -> Pandoc)
122 -> Compiler (Page String) (Page String)
126 -> Compiler (Page String) (Page String)
123 -> Compiler Resource (Page String)
127 -> Compiler Resource (Page String)
124−pageCompilerWithFields state options f g = cached cacheName $
128+pageCompilerWithFields state options f g =
125 readPageCompiler >>> addDefaultFields >>> g >>> arr applySelf
129 readPageCompiler >>> addDefaultFields >>> g >>> arr applySelf
126 >>> pageReadPandocWith state
130 >>> pageReadPandocWith state
127 >>> arr (fmap (writePandocWith options . f))
131 >>> arr (fmap (writePandocWith options . f))
128− where
129− cacheName = "Hakyll.Web.Page.pageCompilerWithFields"
130
132
131-- | Add a number of default metadata fields to a page. These fields include:
133-- | Add a number of default metadata fields to a page. These fields include:
132--
134--