{"id":20375660,"url":"https://github.com/bruce-mig/spring-data-redis-cache","last_synced_at":"2026-05-11T02:54:53.498Z","repository":{"id":260780583,"uuid":"882289486","full_name":"bruce-mig/spring-data-redis-cache","owner":"bruce-mig","description":"Demonstrating usage of Redis as DB cache ","archived":false,"fork":false,"pushed_at":"2024-12-18T07:13:56.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T21:51:48.049Z","etag":null,"topics":["mysql","redis-cache","spring-data-redis-crud-example","ttl-cache"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bruce-mig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-02T12:24:06.000Z","updated_at":"2024-12-18T07:14:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6a81f6e-d870-463a-b93c-b91a5dbb368a","html_url":"https://github.com/bruce-mig/spring-data-redis-cache","commit_stats":null,"previous_names":["bruce-mig/spring-data-redis-cache"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bruce-mig/spring-data-redis-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-data-redis-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-data-redis-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-data-redis-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-data-redis-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bruce-mig","download_url":"https://codeload.github.com/bruce-mig/spring-data-redis-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-data-redis-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27468364,"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-12-03T02:00:06.367Z","response_time":57,"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":["mysql","redis-cache","spring-data-redis-crud-example","ttl-cache"],"created_at":"2024-11-15T01:32:21.994Z","updated_at":"2025-12-03T03:11:23.952Z","avatar_url":"https://github.com/bruce-mig.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-data-redis-cache\n\nThis project demostrates the use of Redis as a cache for a MySQL  database using the Cache-Aside strategy. It implements dynamic TTL.\n\n### Cache Aside Pattern\n\n![cache aside pattern](cache-aside-pattern.png)\n\nThis is the most common way to use Redis as a cache. \nCache-aside is an excellent choice for read-heavy applications when cache misses are acceptable. \nThe application handles all data operations when you use a cache-aside pattern, and it directly communicates with both the cache and database.\n\n---\n\n### How to run project\n\n1. Clone the project\n\n```bash\ngit clone git@github.com:bruce-mig/spring-data-redis-cache.git\n```\n\n2. Run persistence stack with docker.\n\n```bash\ncd spring-data-redis-cache\ndocker compose up -d\n```\n\n3. Start the application\n```bash\nsudo chmod +x mvnw\n./mvnw spring-boot:run\n```\n\nThe application is listening on port `:9696`\n\nYou can execute CRUD operations at the path `:9696/users`.\n\n### Monitoring via redis-cli\n\n```bash\n redis-cli -h \u003chost\u003e -p 6379 -a \u003credis-password\u003e monitor | grep -v 'info'\n```\n\n\nLearn more about caching at [redis](https://redis.io/solutions/caching/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruce-mig%2Fspring-data-redis-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbruce-mig%2Fspring-data-redis-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruce-mig%2Fspring-data-redis-cache/lists"}