Cache: split permission cache scanning and cache scanning