Skip to main content

Auto refresh cache of redis with MySQL binlog

Project description

Fettler

image image pypi ci

Introduction

Fettler is a service that help you refresh redis cache automatically. By listening on MySQL binlog, you can refresh redis cache in a timely manner and devoid of sensation or consciousness.

architecture

Install

Just install from pypi:

> pip install fettler

Usage

Config file

The example can be found in config.yml.

Run services

First you should run the services, which include producer, consumer.

Use docker-compose(recommended)

docker-compose up -d --build

Then the services is running.

Run manual

Run producer

The producer listens on MySQL binlog and send data changes to redis message queue.

> fettler produce
Run consumer

The consumer consume message queue and delete invalid caches by data changes and refresh policy registered from server.

> fettler consume

Register cache refresh policy

See examples to see how to add cache refresh policy in you application.

License

This project is licensed under the Apache-2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fettler-0.1.0.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

fettler-0.1.0-py3-none-any.whl (14.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page