Cache get_pages to file

Major speedup!