mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-01-14 07:44:00 +01:00
Propagate exceptions when caching in order to make errors less magic
This commit is contained in:
@@ -25,8 +25,9 @@ class ProjectReportsProvider @Inject() (
|
||||
(implicit executionContext: ExecutionContext): Future[T] =
|
||||
{
|
||||
cache.get[T](name).map(Future.successful).getOrElse(
|
||||
f.andThen{
|
||||
case Success(value) =>cache.set(name, value, expiration)
|
||||
f.map{ value =>
|
||||
cache.set(name, value, expiration)
|
||||
value
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user