simplify statcache code more