Fixed bug with index page cache.

It was checking if posts cache was turned on, instead of index cache.