Add caching to DB queries