when an exception is thrown within the route block. This results in a deadlock, causing the request to hang.
In my usual practice, I propagate exceptions from the Dao, Service, and Controller layers upwards and handle them globally using some handler like StatusPages in ktor.
The lock acquired at: https://github.com/Scogun/ktor-simple-cache/blob/4273e003a2fae93f50a78601607245632f065d50/ktor-simple-cache/src/main/kotlin/com/ucasoft/ktor/simpleCache/SimpleCache.kt#L35-L41
will not released at: https://github.com/Scogun/ktor-simple-cache/blob/4273e003a2fae93f50a78601607245632f065d50/ktor-simple-cache/src/main/kotlin/com/ucasoft/ktor/simpleCache/SimpleCachePlugin.kt#L27-L30
when an exception is thrown within the route block. This results in a deadlock, causing the request to hang.
In my usual practice, I propagate exceptions from the Dao, Service, and Controller layers upwards and handle them globally using some handler like
StatusPages
in ktor.