I’m wondering about the mechanism for publishing resources on their publication date (and unpublication as well). It appears to be done in the cache manager when the cache is cleared, but does that execute often enough to be sure a site visitor will get to see the file on time or that a document will be gone when the unpub date is hit?
It looks like OnDocPublished and OnDocUnpublished do not fire when a resource hits its publication date, but only whan a user manually checks or unchecks the published box and saves. Is that correct?
-
MODX Staff
- 730 Posts
In Evolution, the file assets/cache/sitePublishing.idx.php keeps track of the next publishing "event". Any time a publish/unpublish date is changed, this file is updated. This file is consulted when $modx::executeParser calls $modx::checkPublishStatus.
You are correct that there are no events fired when $modx::checkPublishStatus runs and updates the publishing status of a resource.
Quote from: netProphET at Oct 13, 2009, 09:26 AM
In Evolution, the file assets/cache/sitePublishing.idx.php keeps track of the next publishing "event". Any time a publish/unpublish date is changed, this file is updated. This file is consulted when $modx::executeParser calls $modx::checkPublishStatus.
You are correct that there are no events fired when $modx::checkPublishStatus runs and updates the publishing status of a resource.
Thanks. I wonder if any documents would ever be published on their scheduled dates if the global cache were turned off.