{"id":15658683,"url":"https://github.com/long2ice/fettler","last_synced_at":"2025-10-07T09:31:36.346Z","repository":{"id":57429141,"uuid":"343807792","full_name":"long2ice/fettler","owner":"long2ice","description":"Auto refresh cache of redis with MySQL binlog","archived":false,"fork":false,"pushed_at":"2021-04-07T07:59:29.000Z","size":171,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T03:22:07.251Z","etag":null,"topics":["binlog","cache","mysql","redis"],"latest_commit_sha":null,"homepage":"https://github.com/long2ice/fettler","language":"Python","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/long2ice.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-03-02T14:46:27.000Z","updated_at":"2024-01-07T12:53:47.000Z","dependencies_parsed_at":"2022-09-08T23:41:12.894Z","dependency_job_id":null,"html_url":"https://github.com/long2ice/fettler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Ffettler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Ffettler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Ffettler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Ffettler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/long2ice","download_url":"https://codeload.github.com/long2ice/fettler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235614116,"owners_count":19018400,"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":["binlog","cache","mysql","redis"],"created_at":"2024-10-03T13:13:28.006Z","updated_at":"2025-10-07T09:31:30.940Z","avatar_url":"https://github.com/long2ice.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fettler\n\n[![image](https://img.shields.io/pypi/v/fettler.svg?style=flat)](https://pypi.python.org/pypi/fettler)\n[![image](https://img.shields.io/github/license/long2ice/fettler)](https://github.com/long2ice/fettler)\n[![pypi](https://github.com/long2ice/fettler/actions/workflows/pypi.yml/badge.svg)](https://github.com/long2ice/fettler/actions/workflows/pypi.yml)\n[![ci](https://github.com/long2ice/fettler/actions/workflows/ci.yml/badge.svg)](https://github.com/long2ice/fettler/actions/workflows/ci.yml)\n\n## Introduction\n\n`Fettler` is a service that help you refresh redis cache automatically. By listening on MySQL binlog, you can refresh\nredis cache in a timely manner and devoid of sensation or consciousness.\n\n![architecture](./images/architecture.png)\n\n## Install\n\nJust install from pypi:\n\n```shell\n\u003e pip install fettler\n```\n\n## Usage\n\n### Config file\n\nThe example can be found in [config.yml](./config.yml).\n\n### Run services\n\nFirst you should run the services, which include `producer`, `consumer`.\n\n#### Use `docker-compose`(recommended)\n\n```shell\ndocker-compose up -d --build\n```\n\nThen the services is running.\n\n#### Run manual\n\n##### Run producer\n\nThe producer listens on MySQL binlog and send data changes to redis message queue.\n\n```shell\n\u003e fettler produce\n\n2021-03-17 23:10:23.228 | INFO     | fettler.producer:run:36 - Start producer success, listening on binlog from schemas ['test']....\n```\n\n##### Run consumer\n\nThe consumer consume message queue and delete invalid caches by data changes from binlog and refresh policy registered.\n\n```shell\n\u003e fettler consume\n\n2021-03-17 23:10:36.953 | INFO     | fettler.consumer:run:21 - Start consumer success, waiting for data changes and delete invalid caches...\n```\n\n##### Run both producer and consumer in one command\n\nIf you only need one consumer, you can just run the producer and consumer in one command.\n\n```shell\n\u003e fettler start\n\n2021-03-17 23:10:05.226 | INFO     | fettler.consumer:run:21 - Start consumer success, waiting for data changes and delete invalid caches...\n2021-03-17 23:10:05.230 | INFO     | fettler.producer:run:36 - Start producer success, listening on binlog from schemas ['test']....\n```\n\n## Register cache refresh policy\n\nSee [examples](./examples) to see how to add cache refresh policy in you application.\n\n## License\n\nThis project is licensed under the [Apache-2.0](./LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flong2ice%2Ffettler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flong2ice%2Ffettler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flong2ice%2Ffettler/lists"}