There a number of ini settings which will dictate the maximum size of the values you can store.
A list of the APC specific directives can be found here. http://php.net/manual/en/apc.configuration.php
Most pertinent to your question is:
apx.max_file_size
- Prevent files larger than this value from getting cached. Defaults to 1M.
"Rows" don't do much to describe data in terms of size. It is not unreasonable though to cache thousands of "rows". You can get a better sense of the size of your array by serializing it and then using strlen()
/mb_strlen()
. You probably don't want to go much higher than one MB per file, but you could increase the total size/segments of shared memory available to APC as needed, dependent on available RAM.
If you've fixed your index issues maybe you will determine this is not a good candidate for your cache. There are a few factors to consider when looking at what to cache... How often does the data change? Is it costly to fetch from DB / either slow or requested frequently?