move caching to after limit