moved code up one level to eliminate the docs subdirectory
[acontent.git] / include / phpCache / README
1 phpCache v1.4 by nathan@0x00.org
2 http://0x00.org/phpCache/
3
4 NOTICE: I would like to hear success stories, please email me with any
5                 timing results or whatever.  Before and after, duh.
6
7 This is a little caching system for PHP, it allows you to cache blocks of
8 code on pages.  There are four functions you need to worry about, all
9 sorta documented in phpCache.inc.
10
11 These are the basic functions (please see phpCache.inc for the rest):
12
13 cache_all($cache_time);
14 // Caches the block of code that follows scoped to everyone
15 cache_session($cache_time);
16 // Caches the block of code that follows scoped to the session
17
18 cache($cache_time, $object_name, $object_key);
19 // This is the primary function, both cache_all() and cache_session() call
20         this.  It allows you to tweak to storage settings so you can scope it
21         to different things.  If you don't understand this, don't use it.
22
23 endcache($store);
24 // This function *MUST* be called after all the cached data has been output.
25         It must be called in the block.  If $store is TRUE, the data will be
26         cached.  If it is false, it will not be cached.
27
28 Note: All these functions (except endcache()) return 0 if the block needs to be executed.
29         ie: the cache has expired.
30
31 Please see the scripts in the demo directory for samples.
32
33 -nathan@0x00.org