Improve: move injection code to CounterCache class