It was Moodle's "fault". They're dynamic pages, so it puts cache headers that block caching of content.
Using the power of Nginx, I rewrote those headers when getting the X-moz: prefetch
from Firefox:
if ($http_x_moz ~ ^prefetch$) {
more_set_headers 'Cache-Control: private, max-age=60'
more_clear_headers 'Pragma';
}
In the php
location. I have also conditionally inserted the prefetch tag only for firefox, using server side browser detection.