Custom templates for secondary development of discuz

Source: Internet
Author: User
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 ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.