I have been changing discuz recently! NT, discuz! NT was made to let others change it. Haha, although it is perfect, there is always something unsatisfactory in actual use. If you want to change it, you must have a good understanding of it, otherwise, I changed the version to 2.5, and there is already version 2.6, but there is no way to upgrade and use it because there are too many changes.
Change discuz! NT really makes people learn a lot of things. This stuff contains the necessary technologies for most system development. Although I still cannot tell it clearly, at least I can take discuz! NT is split, just like a child who liked to split toys, one by one, and one by one small module. Can it be used directly when necessary? It's a rock!
Always curious about discuz! NT cache module. I will learn about it this time, discuz! A large amount of cache is used in NT, so the performance is so good.
The first is the way to organize cache objects in this cache module. It seems that the cached object has a certain level of structure, which uses XML to save this structure, you can use XPath to obtain the node of a cache object. This node caches the key value of the object and uses this key value to obtain or delete the object in the cache.
XML is indeed better organized. When you need to update the cache in batches, for example, in discuz! The NT background provides the cache update function. You can obtain a node set through XPath, so that you can easily update the cache objects you want to update.
Second, the policy mode is also used here, discuz! NT uses more design patterns, including factory methods, template methods, and policyholders,
The policy-owner mode is used to separate the modules of the actually organized objects from those of the stored objects. net cache for a new version, you can easily expand, instead of modifying the original writeCode, Very good.
: Discuz.cache.rar