mirror of
https://github.com/usbharu/Hideout.git
synced 2026-09-26 15:01:09 +00:00
fix: #184 ResourceResolverで利用しているCacheManagerで例外が発生した場合にロックが解放されないバグを修正
This commit is contained in:
@@ -29,7 +29,12 @@ class InMemoryCacheManager : CacheManager {
|
||||
}
|
||||
}
|
||||
if (needRunBlock) {
|
||||
val processed = block()
|
||||
val processed = try {
|
||||
block()
|
||||
} catch (e: Exception) {
|
||||
cacheKey.remove(key)
|
||||
throw e
|
||||
}
|
||||
|
||||
if (cacheKey.containsKey(key)) {
|
||||
valueStore[key] = processed
|
||||
|
||||
Reference in New Issue
Block a user