Case insesitive search for cached packages
clean code