[typo] Q1: automatically publishing files.
ernieoporto at gmail.com
Fri Mar 3 07:50:08 EST 2006
Invalidating the cache would not need to happen exactly when the date
passes. This is kind of an "if a tree falls in the woods..." question. If
the site updates when a user accesses the site after the date (could be a
second later, could be an hour later), triggering the cache invalidation,
it's as good as if it were done with a cron or other scheduling process.
Of course, your other option is to run an external trigger, like a rake run
from a cron job. This brings up platform issues, but hopefully we could
iron that out on the list.
On 3/3/06, Kevin Ballard <kevin at sb.org> wrote:
> On Mar 2, 2006, at 11:16 PM, Rich Warren wrote:
> > It seems to me, anything with a publication date in the future should
> > not be displayed. Which means it could be fixed with a very minor
> > change to the way the model grabs articles from the database.
> > Of course, the article could probably still be pulled up using the
> > search or archives. Maybe just change the model so the published flag
> > always returns false until the publication date/time has passed.
> > Again, I haven't cracked open the code yet.
> It's fairly simple to make articles that are in the future be treated
> as unpublished. The problem is caching - you need some way to
> invalidate the cache as soon as the date passes, so the article will
> appear. Otherwise the article will never appear until the cache is
> invalidated some other way (e.g. by posting another article,
> commenting, manually clearing it, etc).
> Kevin Ballard
> kevin at sb.org
> Typo-list mailing list
> Typo-list at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Typo-list