a log lib with cache