Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Future publish_from will never show due to cache.

#27

Originally posted on Trac by gaspard Original Trac Ticket

Description

Cached pages do not consider passing time (future publish_from dates). If we create a page in a project, the project might be cached and when the time comes for the page to be live publish_from , the project's cache will be served by apache and the new page will not show up.

Possible solutions

Fix the time to live of the cache to the minimum of it's "to be published" pages' publication date.

Create a table with scheduled events:


trigger_at when the event should run
event what to do
site_id site reference

With this in place, we need a cron job to check pending actions and when we publish with a publication time in the future, this happens:

Publish with publish_from = in 2 hours (same rights as publication needed).

  1. The only effect is that the version's status becomes ReadyToPublish? (45). Update 'trigger_at' for the event 'publish' for the given site.
  2. Every 1 (5?) minutes, a cron job checks the database for events to trigger. If it finds something, it calls curl with an url like '/heartbeat' (can only be called from localhost).
  3. When 'heartbeat' is called (we are inside running mongrel), the node is actually published by (super user ? version owner ? node owner ?).
  4. Doing a find for versions with status 45 in the current site, the 'publish' entry is either removed or updated.
  5. That's it

Reference: #10 Time to live defined in templates..

Reported by Gaspard Bucher · September 3rd, 2008 @ 12:46 PM

State: new
Milestone: 1.0
Assigned to: Gaspard Bucher Gaspard Bucher

Activity

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.