LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Feedback/Feature Requests > conditional execution of a script on mod times

Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2005, 12:55 PM
djkoopman djkoopman is offline
New Member
 
Join Date: May 2005
Posts: 4
Default conditional execution of a script on mod times

What I would like is, in the webserver context, ie at webserver execution speed, to compare the mod time (or existance of a static file) and a 'flag' file.

I want to leverage the speed of 'up to date' static pages, but to be able to regenerate 'old' or missing pages from database content using scripts - at run time.

The idea is that a CMS modifies an internal version of a page part (eg a title page) and, at the same time, touches some 'well known' filename. The webserver comes along and compares the mod time of the file and the 'well known' (or 'flag') filename. If that 'flag' file is newer, then a page regeneration script is run and a redirect sent after the new version is (re)generated.

A hierarchy would be good...

Obviously one can do this in the FCGI entity of your choice, but that slows the whole site down.

I have large sites where parts are not looked at from one month to the next, but detail changes are made to the look and feel in other parts. The sites are otherwise static - with no *runtime* dynamic content (although the actual content is operated on by the CMS and stored in databases of various kinds).

Does this make sense? I know that if a .html is missing mod_rewrite can be persuaded to regenerate it, but, AFAIK there is no facility to compare the modtimes of two files in mod_rewrite.
Reply With Quote
  #2  
Old 05-06-2005, 01:24 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I understand. I think it is better to do it in more generic way.
Looks like what you want is something like SSI + Cache. Those are on our to do list, SSI will be implemented soon, but cache will not be available for a while.

I think what you want can be archived now with mod_rewirte + some backend cron jobs.

Are you able to do this with Apache now?

George
Reply With Quote
  #3  
Old 05-06-2005, 02:03 PM
djkoopman djkoopman is offline
New Member
 
Join Date: May 2005
Posts: 4
No you can't do it with apache (AFAIK).

And I don't want a cache. I can do caches :-)

This sort of feature (which could be made part of mod_rewrite) would be generally very useful.

The whole point of this is to make static sites, just that; but with the advantages of easy global change and 'lazy' regeneration.

To re-iterate, SSI doesn't give me what I require (eg looking at databases) and caches simply moves the problem, but doesn't solve it: I only want to run a script if a page needs to be regenerated. I don't want to go *near* a (F)CGI interface unless I really need to.
Reply With Quote
  #4  
Old 05-06-2005, 02:29 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Then what you need is to use a backend job to remove outdated files, and use a rewrite rule to detect missing files and forward request to a script to generate the file on the fly.

Our SSI will allow you to include output from a (F)CGI, so content could be dynamic generated from DB. Dynamic content could be cached if it does not change frequently.

LiteSpeed SSI + Cache could be the most scalable solution for web pages with partial dyanmic content that don't change very often. :-)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
install from script? djsodom Install/Configuration 6 04-02-2007 05:18 PM
context for CGI script always says "access denied" henpa Install/Configuration 1 03-28-2006 09:43 AM
Associating a script with a CGI Tadeo Install/Configuration 3 12-16-2005 10:51 AM
default autoindex script djkoopman Bug Reports 2 05-09-2005 11:12 AM


All times are GMT -7. The time now is 09:23 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.