private function rebuild($className)
    {
        $instance = new $className;

        if (method_exists($instance, 'countCaches')) {
            $this->info("Rebuilding [$className] count caches");
            $countCache = new CountCache($instance);
            $countCache->rebuild();
        }

        if (method_exists($instance, 'sumCaches')) {
            $this->info("Rebuilding [$className] sum caches");
            $sumCache = new SumCache($instance);
            $sumCache->rebuild();
        }
    }