updated cache handling