> I want to make a Object browser similar to Windows Explorer in interface, but on an HTML page. Basically you click on the plus symbol next to a branch and it expands it, showing child Objects, etc. > > The problem is I want to limit the impact this has on the database, so once a branch is expanded I want it to be cached so that it's data will not be retrieved again until the branch is closed and expanded again, or it has been left open and un-updated for too long. > > What I *want* to do is store each branch's output in a separate BLOCK, variable or something, and store the content (complete in formatted HTML tables) in the cached template. Then when the user clicks to expand a branch, or close a branch, or does anything that requires new output, the script will load the compiled template, create new blocks for each of the changed branches, and merge the data.
Don't bother trying to cache the HTML output, just cache the data. TT is fast enough (once the template has been cached) that regenerating the HTML each time is pretty painless. - Perrin
