Skip to content

Instantly share code, notes, and snippets.

@aleweichandt
Created August 17, 2021 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aleweichandt/85f4ea8cf7a91a3641529b4819168261 to your computer and use it in GitHub Desktop.
Save aleweichandt/85f4ea8cf7a91a3641529b4819168261 to your computer and use it in GitHub Desktop.
Cache Interface example
interface ITodoCache {
// required for List<Todo> output
suspend fun getAllTodos(): List<Todo>?
suspend fun storeAllTodos(todos: List<Todo>)
suspend fun deleteAllTodos()
// required for Todo output
suspend fun getTodoById(id: Long): Todo?
suspend fun storeTodo(todo: Todo)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment