Fixed cache logic