add setAttribute to cache classes