Cached Fast Template
Where did this come from?
This is just a quick web page to give a home to the cached fast template.
Both of these versions implement caching for PHP's FastTemplate module which can be found at: http://www.thewebmasters.net/php/FastTemplate.phtml.
The file named FastTemplate.pinc is integrated with FastTemplate so it just adds functionality.
The file named cacheFastTemplate.pinc is a new class which inherits from FastTemplate. Some people may find this version easier to digest.
Most of the caching code was not written by me. Most of the code came from Spencer D. Mindlin <email@example.com> and "JP" <firstname.lastname@example.org> You can find the articles written by these coders at: http://www.phpbuilder.com/columns/spencer20000208.php3 and http://www.phpbuilder.com/columns/jprins20000201.php3 respectively.
What are the features?
- Supports lock files, so long operations will not allow pages to be served only "half" cached. Most important on heavily loaded machines.
- Allows caching to be decided when the cache is being tested, not written to. This means that caching policies can be easily changed.
- Blocks can be cached seperately, meaning that different parts of the page can be cached for different amounts of time, or not cached at all.
- Allows caches to be invalidated on an event basis. (Every half hour, on the half hour, for example.)
- Allows caches to be invalidated on a time bases. (After 45 seconds, for example.)
- Handles dynamic blocks and normal blocks without a problem.
- Intelligent cache naming, allowing the most flexibilty with caching.
- July 20th, 2000
- New version of Fast Template is available. This version fixes some capitalization troubles with the cache and hostnames. Also, this version adds better support for dynamic blocks. Note that due to a translation problem, previous versions of fast template were corrupted and should not be used. Please upgrade as soon as possible. Let me know if you have any problems with this version. BTW -- would anyone use the CVS version if I made it available?
- May 20th, 2000
- Whew! One small announcement, and this page becomes popular! In fact, there have been 0
unique visitors to this site! (Based on IP address. And, just for laughs, 0
IE 5 users have bookmarked this site.)
I've added a few more sections to the page to help people find what that need.
Who else is doing things like this?
cachedFastTemplate-1.0.1.tar.gz This new version fixes many problems. If you have downloaded version 1.0 please upgrade! (If you downloaded before July 20, 2000, you have the wrong version.)
cachedFastTemplate-1.0.0.tar.gz Discontinued. Too many bugs to be released.
So what does the code look like? Download or View FastTemplate.pinc
Download or View cacheFastTemplate.pinc
Cached Fast Template
You will need all four files for this example:
- Add version control/CVS
- Fix known bugs
- Make a prettier web page with more examples
- The file paths are very UNIX specific. They should be made more general so PHP
running under Windows (for example) will still work. Say... Does PHP run
Benjamin Kahn <email@example.com>
Copyright (c) 2000 CyberSites, Inc.; Benjamin Kahn
HTTP/1.1 200 OK
Date: Mon, 20 May 2013 16:34:06 GMT