cache total value for optimize

Can handle 5000+ req/s without persistent and 3000+ req/s with
persistent. Redis IO round trip latency is an issue. Next version may
use multi-process.