Commit c03d25b9 authored by Peter Kellner's avatar Peter Kellner Committed by Tim Neutkens

Added length calculation for insert of cache rather then default to 1… (#5835)

* Added length calculation for insert of cache rather then default to 1. changed default cache from 100 to 100MB

* adjusted for lint
parent ffe1a12f
......@@ -9,7 +9,10 @@ const handle = app.getRequestHandler()
// This is where we cache our rendered HTML pages
const ssrCache = new LRUCache({
max: 100,
length: function (n, key) {
return n.toString().length + key.toString().length
},
max: 100 * 1000 * 1000, // 100MB cache soft limit
maxAge: 1000 * 60 * 60 // 1hour
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment