more efficient cache handling