Add cache functionality