fixed issue with instances not getting inserted into cache