added methods to store current record in cache