db/pmi: speed up modex by caching pmi data internally