add testing for key cache