UBB.Dev
Posted By: jordo Cache workarounds ala 6.0x...? - 07/31/2001 7:50 AM
just wondering what idea people have for adding dynamic content to cached pages since serving from cache now runs to a sub which prints right to the STDOUT, so the cache file is never loaded into a variable to manipulate (for thread pages, not sure if everything else uses it, but i assume they do since its such a generic sub).
now the 2 things ive worked up are :
1) dont serve the page from cache if you want dynamic content in it.
pros: its easy. with improved speed of 6.1.x it isnt such a bad alternative.
cons: still it is just bypassing the cache, so if you want dynamic stuff on all your threads your basically turning the cahce off. smirk
2) change the sub that serves the cache file, maybe create a new one, so it reads it to a variable before printing.
pros: would essentially be the same as on 6.0x. would let cache do its thing, yet allow dynamic stuff anywhere.
cons: defeats the point of not binding the file contents to a variable. could be a little sticky in the generic sub unless a new one is created so the old one doesnt have to be modified.

so anyway what do you all think? i havent taken a look at how qasic is doing it in whos online 4.0.1 yet, but im assuming (correct me if im wrong) that hes just doing a cache bypass. i guess i should take a look at it though, heh.
Posted By: Charles Capps Re: Cache workarounds ala 6.0x...? - 07/31/2001 8:55 AM
3. Don't use hacks that require breaking the cache and wait for 6.2.0 for cache-friendly dynamic content.
Posted By: qasic Re: Cache workarounds ala 6.0x...? - 07/31/2001 6:00 PM
jordo,

WOL 4.1.a uses it's own localized serve from cache routine reading line by line and sending it out line by line if $_ is not equal to WOL trigger line.

That's currently the method I'm using. I've been thinking about doing it from within the ServeFromCache subroutine, but I'm not too sure about the implications of that yet.

LMK if you need an advance copy of WOL. If you do, give me a shout and I'll pass it over.

qasic
© UBB.Developers