Skip to content

Commit

Permalink
Use @Cacheable for ereg_client.
Browse files Browse the repository at this point in the history
  • Loading branch information
MalazAlkoj committed Jun 25, 2024
1 parent b4b8f75 commit 508774b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/kotlin/no/nav/syfo/ereg/EregClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import no.nav.syfo.util.NAV_CONSUMER_ID_HEADER
import no.nav.syfo.util.createCallId
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Value
import org.springframework.cache.annotation.Cacheable
import org.springframework.http.HttpEntity
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpMethod
Expand Down Expand Up @@ -42,11 +43,11 @@ class EregClient @Inject constructor(
throw e
}
}
/*@Cacheable(
value = [CacheConfig.CACHENAME_EREG_VIRKSOMHETSNAVN],
@Cacheable(
value = ["ereg_virksomhetsnavn"],
key = "#virksomhetsnummer",
condition = "#virksomhetsnummer != null",
)*/
)
fun virksomhetsnavn(virksomhetsnummer: String): String {
return eregResponse(virksomhetsnummer).navn()
}
Expand Down

0 comments on commit 508774b

Please sign in to comment.