{"id":16550421,"url":"https://github.com/eiselems/update-cache-on-success","last_synced_at":"2025-10-17T09:32:44.690Z","repository":{"id":102416371,"uuid":"138626710","full_name":"eiselems/update-cache-on-success","owner":"eiselems","description":null,"archived":false,"fork":false,"pushed_at":"2018-06-25T18:07:37.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T15:35:11.506Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eiselems.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-25T17:15:19.000Z","updated_at":"2018-06-25T18:07:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b23633d-6aea-42af-8ad4-767602a78b6b","html_url":"https://github.com/eiselems/update-cache-on-success","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eiselems/update-cache-on-success","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiselems%2Fupdate-cache-on-success","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiselems%2Fupdate-cache-on-success/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiselems%2Fupdate-cache-on-success/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiselems%2Fupdate-cache-on-success/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiselems","download_url":"https://codeload.github.com/eiselems/update-cache-on-success/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiselems%2Fupdate-cache-on-success/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279318044,"owners_count":26147180,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T19:34:18.482Z","updated_at":"2025-10-17T09:32:44.673Z","avatar_url":"https://github.com/eiselems.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# update-cache-on-success\n\n\nThis is a little showcase to see how cache eviction works together with refreshing a cache.\n\nIt relies on REDIS running on 127.0.0.1:6379 (default for local installation).\n\n## The service\n\n### How to run it\n./mvnw spring-boot:run\nor\n./mvnw.bat spring-boot:run\n\n### What is it about?\nAfter starting the service you can test it on http://localhost:8080/\u003canyGithubUserName\u003e e.g. [http://localhost:8080/eiselems](http://localhost:8080/eiselems).\n\nThe service sadly has a high failure rate (Hey I KNOW, github is fine ...),\nthe error is introduced manually on this test service.\nIn 50% of the cases it throws a RunTimeException.\n\nThankfully this service here is caching the response. The response is cached for 20 seconds.\n\nWhat this should show:\n* After successful retrieval it is stored for 20seconds\n* After trying it again after more than 20 seconds the request is executed again\n* When the cache is empty (nothing can be done here), or the cache expired (after more than 20s) the exception bubbles up until it reaches the controller (=\u003e the user).\n\nIs there a way around so that instead of bubbling up the exception - that we can return the previous value?","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiselems%2Fupdate-cache-on-success","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiselems%2Fupdate-cache-on-success","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiselems%2Fupdate-cache-on-success/lists"}