about summary refs log tree commit diff
path: root/services/tazblog/src/Server.hs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-21T10·07+0100
committerVincent Ambo <tazjin@google.com>2019-08-21T10·07+0100
commit008be5c2e195761167b51c4c4b6bd1527fd9d854 (patch)
tree3991880d65b0a32cc2afd039e62e58d4e7f3e4cd /services/tazblog/src/Server.hs
parentbf2efeba2d5772ba1853ec5875c3c2faf02f1b07 (diff)
refactor(tazblog): Directly instantiate Resolver when launching r/48
Caching behaviour is tied to the resolver.
Diffstat (limited to 'services/tazblog/src/Server.hs')
-rw-r--r--services/tazblog/src/Server.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/tazblog/src/Server.hs b/services/tazblog/src/Server.hs
index 57b1463268..4be76052be 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