Fix two typos in CacheEngine.php
Merge pull request #1157 from ravage84/patch-1

Fix two typos in CacheEngine.php
Fix an issue which gives gibberish output when gzip is enabled.
Merge pull request #1158 from uzyn/bugfix/handleFatalError

Fix an issue which gives gibberish error message when gzip is enabled.
Fix failing tests.

Two buffers are needed now that handleFatalError() is blowing one up.
Related to pull request #1158
Restore whitelist when save fails.

Fixes whitelist not being restored when save fails due to no data.

Fixes #3646