cache each class separately