Skip to content
This repository was archived by the owner on May 16, 2018. It is now read-only.
This repository was archived by the owner on May 16, 2018. It is now read-only.

Zend Page Cache - saved cache is empty #113

@Benno007

Description

@Benno007

Somehow, Zend Page Cache is able to cache completely empty pages (that should have content). The $data it saves can be completely empty in certain circumstances.

I have no idea how it happens, but one way is from a server performing a HEAD request on a page. It seems to save the empty response body of the HEAD request to a cache file. I've seen this by adding logging where it posts the $_SERVER variables to the text file along with the $data. $data is empty, but $_SERVER['REQUEST_METHOD'] is HEAD.

Other ways the cache is sometimes empty seems to be from Baidu spider and yandex spider. I honestly cannot figure this out.

Due to the nature of the page cache dieing after it echo's the $data on _flush, this results in an empty page being served to users. I've had to modify _flush to add:

if(empty($data)) return true;
else die();

Has anyone else ever experienced this? Is there any other way to fix it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions