When we use PHP to develop the CMS system, the cache processing is essential, the cache processing for the execution of the program has a certain help, PHP cache class can be used to detect whether the file in the setting update time, clear cache files, based on the current dynamic file generation cache file name, create a directory. Cache file output and so on functions ~
The first step is still to download the PHP cache class that we need for this lesson: http://www.php.cn/xiazai/leiku/822
Then we compress the files we downloaded to our local, then we create a new PHP file instantiation class and call this class:
<?phpinclude_once "hc.php"; $cache = new Cache (+), $cache->cachecheck (), Echo date ("y-m-d h:i:s"); $cache Caching ();
When we run this PHP file, the results are as follows:
While running this PHP file, the program will automatically create a new cache directory in the directory and the directory will have a PHP file, which records the results of our operation:
The contents of the file are as follows: