actualizeAll now is overridable in auto recache repos

This commit is contained in:
InsanusMokrassar 2023-02-02 20:05:16 +06:00
parent a5f718e257
commit 168d6acf7c
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ open class AutoRecacheReadCRUDRepo<RegisteredObject, Id>(
idGetter: (RegisteredObject) -> Id
) : this(originalRepo, scope, kvCache, recacheDelay, ActionWrapper.Timeouted(originalCallTimeoutMillis), idGetter)
protected suspend fun actualizeAll(): Result<Unit> {
protected open suspend fun actualizeAll(): Result<Unit> {
return runCatchingSafely {
kvCache.actualizeAll(originalRepo)
}

View File

@ -40,7 +40,7 @@ open class AutoRecacheReadKeyValueRepo<Id, RegisteredObject>(
idGetter: (RegisteredObject) -> Id
) : this(originalRepo, scope, kvCache, recacheDelay, ActionWrapper.Timeouted(originalCallTimeoutMillis), idGetter)
protected suspend fun actualizeAll(): Result<Unit> {
protected open suspend fun actualizeAll(): Result<Unit> {
return runCatchingSafely {
kvCache.actualizeAll(originalRepo)
}

View File

@ -45,7 +45,7 @@ open class AutoRecacheReadKeyValuesRepo<Id, RegisteredObject>(
recacheDelay: Long = 60.seconds.inWholeMilliseconds
) : this(originalRepo, scope, kvCache, recacheDelay, ActionWrapper.Timeouted(originalCallTimeoutMillis))
protected suspend fun actualizeAll(): Result<Unit> {
protected open suspend fun actualizeAll(): Result<Unit> {
return runCatchingSafely {
kvCache.actualizeAll(originalRepo)
}