Handle stats.size correctly
Handle options.cache.
Only set the cache parameter if this is a number