From 008be5c2e195761167b51c4c4b6bd1527fd9d854 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 21 Aug 2019 11:07:25 +0100 Subject: refactor(tazblog): Directly instantiate Resolver when launching Caching behaviour is tied to the resolver. --- services/tazblog/src/Server.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/tazblog/src/Server.hs') diff --git a/services/tazblog/src/Server.hs b/services/tazblog/src/Server.hs index 57b1463268c2..4be76052beeb 100644 --- a/services/tazblog/src/Server.hs +++ b/services/tazblog/src/Server.hs @@ -29,8 +29,8 @@ tmpPolicy = defaultBodyPolicy "/tmp" 0 200000 1000 runBlog :: Int -> String -> IO () runBlog port respath = do - cache <- newCache "blog.tazj.in." - simpleHTTP nullConf {port = port} $ tazBlog cache respath + withCache "blog.tazj.in." $ \cache -> + simpleHTTP nullConf {port = port} $ tazBlog cache respath tazBlog :: BlogCache -> String -> ServerPart Response tazBlog cache resDir = do -- cgit 1.4.1