{"id":22938754,"url":"https://github.com/satoshun/rxkotlincache","last_synced_at":"2025-04-01T19:44:27.387Z","repository":{"id":57722609,"uuid":"112916779","full_name":"satoshun/RxKotlinCache","owner":"satoshun","description":"simple cache for RxJava and Kotlin","archived":false,"fork":false,"pushed_at":"2018-11-09T12:06:44.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T12:48:47.067Z","etag":null,"topics":["kotlin","rxjava2"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/satoshun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-03T09:53:19.000Z","updated_at":"2018-11-09T12:06:46.000Z","dependencies_parsed_at":"2022-09-14T01:14:27.115Z","dependency_job_id":null,"html_url":"https://github.com/satoshun/RxKotlinCache","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satoshun%2FRxKotlinCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satoshun%2FRxKotlinCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satoshun%2FRxKotlinCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satoshun%2FRxKotlinCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/satoshun","download_url":"https://codeload.github.com/satoshun/RxKotlinCache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246704317,"owners_count":20820564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kotlin","rxjava2"],"created_at":"2024-12-14T12:28:06.697Z","updated_at":"2025-04-01T19:44:27.368Z","avatar_url":"https://github.com/satoshun.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.satoshun.RxKotlinCache/rxkotlincache/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.satoshun.RxKotlinCache/rxkotlincache)\n\n# RxKotlinCache\n\nIt's a simple cache for [RxJava2](https://github.com/ReactiveX/RxJava) and Kotlin.\n\nRxKotlinCache don't cache a Error, only cache success and complete events.\n\n\n## How to install?\n\nuse Gradle\n\n```groovy\nimplementation 'com.github.satoshun.RxKotlinCache:rxkotlincache:0.1.1'\n```\n\n## How to use it?\n\nIt can wrap a FunctionX(method reference) with cache(before result).\n\n```kotlin\nclass UserDao {\n    fun getUser(userId: Int) : Single\u003cUser\u003e {\n        // body\n    }\n}\n\nclass UserRepository(private val userDao: UserDao) {\n    private val getUserFromCache = rxCache(userDao::getUser)\n\n    fun getUser(userId: Int) : Single\u003cUser\u003e {\n        return getUserFromCache(userId) // get userDao::getUser if not exists a cache\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatoshun%2Frxkotlincache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatoshun%2Frxkotlincache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatoshun%2Frxkotlincache/lists"}