Replies: 2 comments 1 reply
-
Hello 👋 |
Beta Was this translation helpful? Give feedback.
0 replies
-
in Addition to what @dariuszkuc mentioned, you can also write as many indirection layers as you want to achieve the caching data class User(val name: String, val lastName: String)
class UserService(
userRedisRepository: UserRedisRepository
) {
fun getUser(id: Int): CompletableFuture<User> {
userRedisRepository.find(id) ?: // make your sevice call
}
}
class SimpleQuery(
val userService = UserService()
) : Query {
suspend fun user(id: Int): User = userService.getUser(id).await()
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We would like to cache some data returned by back-end services with redis and java serialization. The fact that the classes generated from the schema do not implement
java.io.Serializable
make this impossible. Is there a way to customize the generator to add theSerializable
implementation ?Thanks !
Beta Was this translation helpful? Give feedback.
All reactions