Auto refresh cache of redis with MySQL binlog
Project description
Fettler
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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.