Caching class extensions