Caching redundant db calls