Add cache support to statistics