首页
开发手册
应用中心
工具
用户中心
Ease Template Static Page
English
中文简体
English
上一篇
下一篇
### Ease Template Static Page The role of semi-static is mainly to solve the problem of page jams caused by the large amount of data. Through the cache mode, the page becomes static, and the data can be updated regularly, so that the load can be greater when more people use it. The semi-static mode is stored under cache_htm, and you can change the directory if you need it. Please refer to the following example, we first read out 50,000 cycles of data for the first time, you can try the difference. ``` htm_dir('cache_htm'); //Update time is 60 seconds $tl->htm_time(60); //Output buffer $tl->htm_p(); for ($i=0;$i<=50000;$i++) { $data .= $i.'
'; } $tl->set_file('et_c5'); $tl->p(); ?> ``` The first execution is very slow. When the cache is established, the page is refreshed very quickly. When the cache time expires, the cache will be generated again. The update time can be set longer according to requirements, such as 1 hour, 3600 seconds.