Increases page cache size when needed

Fixes #4943