add buffer support with api (use redis for backup)