Cache prefixes rather than lookup from config each time