You should cache the call to `getMaxResults` - not because of performance, but because you can never trust subsequent calls