added a method to load records from a cache insteed of the database