Add checking for availability when searching through cache