I installed the discuz program in the bbs folder, and then I created the main program in the folder.
Through learning and testing, I can create images folders and css js, put them on my own pages, and connect to the database to get data.
But there is no cache. Therefore, we need to make improvements by caching them like the discuz template.
The current directory is as follows:
Several php entry files -------- static (my css js Image folder) ---- classandfunc (class function) ------ templates (simple and crude template made by myself) ------ cache (my own page cache) ----- bbs (folder for discuz installation)
In this preliminary structure, how can we call the discuz Cache mechanism to generate a cache for our own pages?
Does your own cache exist in your own cache, or in the cache folder of discuz? (In this case, when the cache is refreshed in the background, you can keep up with what you do on the outside)
Prepare 200 points for this post.
Please advise.
Reply to discussion (solution)
You can write this cache by yourself. The Cache mechanism of discuz is specific, such as the cache for the post and the cache for the topic... file Cache and database cache. I have not found any caching functions that can be called.
Your cache is nothing more than the file cache of the page, that is, reading and retrieval. it is also easy to write your own
For background cache refresh and synchronization, you can find \ source \ admincp \ admincp_tools.php and add and delete your own cached code under $ step = 3 (about 33 lines ).