caching class structures