I have a little hobby website running on my 510-2143. Obviously that's a slow 
system to begin with. Then if you factor in that I use Net.Data with extensive 
SQL, sometimes 15+ queries to build a page, you can see why it goes downhill 
(www.distortion.us ...click on a review or two and you'll see what I mean, and 
there is NO load on this system aside from the 50 or so hits a day). Now, I 
know I have some room for improvement with indexes and such, but at this point 
I'd like to see if caching is an option, because to do these pages right, I 
really do need to run a lot of queries to pull a lot of information together. 
Again, I can probably reduce the number, but it's still not going to be greased 
lightning.

So I started looking into Triggered Cache Manager, and you may remember me 
noting here that no proper documentation exists.

So I started thinking about building my own. I'm just starting to think about 
this, but I'm thinking one way of dealing with it would be to wrap the website, 
then have something that decides that if a cached version of a page exists, 
that one would be displayed.

The site is simple in that (not in the current production version, but the 
soon-to-be) there is only one page, the Index. That page either gets passed a 
"Story" number, or not, and from that decides if it should draw the home page, 
or a "Story" page. Therefore, there are a finite number of pages, and I can 
"figure out" what those are by looking at my databases.

So I would attach a trigger to all the affected tables, and write some logic in 
there to regenerate pages as needed by submitting the request to a queue that a 
NEP would be watching.

Before I reinvent the wheel, is anyone else implementing such a thing that they 
would be willing to share a high-level overview of?

Specific stuff I'm wondering about:

1. How would one go about "generating" the cached pages. I know I could use a 
PC-based tool to "download" the site, then publish it back to the IFS, but I'd 
rather 100% automate this. Can I call Net.Data from the command line and 
redirect its output to a file?

2. I realize this may be too application-specific, but in vagaries, how could 
you "wrap" the website to be able to recognize that a page is in the cache and 
display it? Maybe convert the single parm that can be passed into the page (K) 
in a folder name, something like Index/1/Index.HTML, Index/2/Index.HTML...I 
don't know...

3. If I do something like the naming above, can the logic to decide if the 
cached page exists or not be moved to the Apache server itself using some sort 
of pattern match mapping?

4. Where does one learn more about the syntax for pattern matching used in 
Apache? I need the dummies version. I'm dying to get rid of the 
/cgi-bin/db2www/ that's in every URL, as well as mapping / right to the home 
page instead of clicking to it.

Thanks in advance!

Zak Metz
Group 1 Software
AS/400, iSeries 400 Platform Specialist
IBM Certified Specialist - IBM eServer iSeries 400 Technical Solutions 
Implementer


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.