working getattr caching