some caching improvements #2