I was thinking about caching html content so instead of generating the whole dom, I could cache a complete chunk and to store it in-memory or in redis. Reducing garbage generated/cycles used per request. This was my approach: https://github.com/soywiz/ktor-steps/commit/36d83471e4554ab19eae6aef3ec104093d4a6b7f Is there already an official way for doing this? Also it is possible to mix suspend things when constructing the dom, so I can for example grab something from a database inside a “cache” chunk and do that just once?
o
orangy
01/30/2018, 5:02 AM
Yeah, server-side caching is somewhat missing, but it needs expiration policy, eviction strategy, multithreading support, etc. We tried to make some, but it wasn’t finished for public API. We still have plans to do it.