[typo] Q1: automatically publishing files.

Kevin Ballard kevin at sb.org
Fri Mar 3 01:55:50 EST 2006


On Mar 2, 2006, at 10:36 PM, Rich Warren wrote:

> I have two quick questions, but I'm going to split them into separate
> messages, since they are considerably different.
>
> Is there any way to create articles and have them automatically
> published in the future? I thought that setting a future date would
> work, but the article appeared immediately.

It's filed in Trac, but this is not something that is implemented yet.

I actually had a decent idea about this the other day but forgot to  
post it to the list. The main problem with this request is  
automatically publishing the article when the date passes. The idea I  
had was to store the next auto-publish day in a global table and on  
each request do a quick comparison against the table and, if the  
current date is later than the saved one, sweep the fragment cache  
(or, ideally, just the parts necessary to show the article) and re- 
set the date to the next time. There's 2 issues I can think of with  
this, but they're not bad. The first is checking this would probably  
incur an extra SQL query per request, but that might be solved by  
putting it in the settings table (since it is a kind of pseudo- 
setting) which gets loaded anyway. The second issue is two fcgi  
processes processing requests at the same time and both detecting the  
date has passed, but I don't think this is a problem either because  
all that happens to publish the article is the cache is swept, and  
there's no problem with sweeping it twice - it just means one more  
uncached request.

Scott Laird, if you're reading this, do you have any thoughts on this  
suggestion?

-- 
Kevin Ballard
kevin at sb.org
http://kevin.sb.org
http://www.tildesoft.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2378 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/typo-list/attachments/20060302/002fc2a7/smime.bin


More information about the Typo-list mailing list