Implement cache swapping