Return to top
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 17:26:41 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 26m 41s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 23:43:53 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 43m 53s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 21:22:32 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 22m 32s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 21:56:46 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 56m 46s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 07:44:44 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 44m 44s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.8.0-beta-2011-10-25 with TbsSQL v3.2 for MySQL-Extended
(time now: 06:39:06 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 39m 07s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.8.0-beta-2011-10-25 with TbsSQL v3.2 for MySQL-Extended
(time now: 12:02:25 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 02m 25s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.8.0-beta-2011-10-25 with TbsSQL v3.2 for MySQL-Extended
(time now: 07:47:47 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 47m 47s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 01:47:20 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 47m 20s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 22:55:35 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 55m 35s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 16:50:32 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 50m 32s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 11:51:52 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 51m 52s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 14:30:42 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 30m 42s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 16:22:09 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 22m 09s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 05:54:23 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 54m 23s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 05:48:06 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 48m 06s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 11:38:50 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 38m 50s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.7.0 with TbsSQL v3.2 for MySQL-Extended
(time now: 13:47:45 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 47m 45s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.6.2-rc-2011-02-09 with TbsSQL v3.2 for MySQL-Extended
(time now: 21:24:22 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 24m 22s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.6.2-rc-2011-02-09 with TbsSQL v3.2 for MySQL-Extended
(time now: 00:32:25 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 32m 25s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.6.1 with TbsSQL v3.2 for MySQL-Extended
(time now: 09:22:49 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 22m 49s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.6.1 with TbsSQL v3.2 for MySQL-Extended
(time now: 21:16:37 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 16m 37s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.6.1 with TbsSQL v3.2 for MySQL-Extended
(time now: 15:44:27 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 44m 27s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.6.1 with TbsSQL v3.2 for MySQL-Extended
(time now: 00:07:31 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 07m 31s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.6.1 with TbsSQL v3.2 for MySQL-Extended
(time now: 17:40:15 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 40m 15s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
One script - multiple caches basicpage2a.php
One script - Multiple caches
TBS v3.6.1 with TbsSQL v3.2 for MySQL-Extended
(time now: 07:57:13 )
 
Alphabetically: All G's H's L's W's
 
Category
Alien
Geek
Politician
      All of the Contact's
Contact NameEmail AddressPrimary phone
Gossamar, Gary   999--555-1234
Graystone, Joey joey@comcast.net 999--555-1234
Greenleaf, Mike   999--555-1234
Hardy, Andy qwerrty@asdf.net 123-345-6789
Houdini, Harry harry@comcast.net  
Lastly, Tom tom@tomlastly.com 222-1232
Walker, John   999--555-1234
Warranski, Wilko zelda@symballking.com 999-555-1234
All contacts were were cached at 57m 13s for 60 sec.
Favorites
  • zdfr
  • gerg
  • ersg
  • searg
  • esarg
  • erg
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>
For ease of development and maintenance many prefer to put the whole application in a single script - TBS's simple and powerful conditional blocks (among other things) makes this more attainable than ever.

Now lets worry about server performance -- the way I cache pages does depend on the content of the page and incorporating all content views in a single script poses an interesting problem. I worked the TBS subscript technique till I was blue in the face - yes it works, but it spreads the code and templates far and wide - not a happy camper till the obvious dawned. Perhaps not new for many of you - but I pass it along for the newbies to learn from.

The 'obvious lightbulb moment' was realizing that all of the logic for establishing the page content was in fact the same logic I could use for controlling the cache content. Shazam! Just mke the cacheid and cache time variables!!!
Here's the source code for template file.
And here (below) is the php to create individual cache files based on the content rendered.
<?php
// check tha vars passed back from the rendered appl page
// These control the content for this instance of the script/application
if(isset($id)){  // link clicked for an individual data record
$cacheid = "contactsid$id";
$cachesecs = $idsecs = 180;
}elseif(isset($letter) ){   // link clicked to view a subset/categ of data
$cacheid = "contactsletter$letter";
$cachesecs = 80;
$pagelabel = "The $letter's ";
}else{
$cacheid = "contactsall"; // DEFAULT show all for default view
$cachesecs = 0;
$pagelabel = "All contacts ";
}

$TBS = new clsTinyButStrong ;
//$TBS->LoadTemplate('basic_page2.html') ;
$TBS->LoadTemplate(basename($_SERVER['SCRIPT_NAME'], ".php").".html") ;

//$TBS->Render(TBS_NOTHING);

// == here's the tricky bit ==
// Creating different cache files based on vars above
if (!$TBS->CacheAction($cacheid, $cachesecs)) { // to check cache

// do all the sql and merges here

$TBS->Show

} // end the if(cache) test
?>