AnQiCMS Help Document and User Guide
The template caching mechanism description: Anqi CMS adopts memory caching optimization strategy in the production environment (production): Preloading at startup: The template files are loaded into memory all at once when the service starts Rendering acceleration: The page requests directly read the memory template, avoiding repeated disk I/O operations Performance advantages: Reduce server load, improve web page response speed to milliseconds level Development modification注意事项 When modifying template files through external editors (Baota panel/VSCode, etc.): ✖ Modifications only affect disk files ✖ The memory cache template does not update automatically
The use of template files is similar to the Django template engine's tag syntax, variables are defined using double curly braces, such as {{variable}}.Conditional statements, loop control tags, etc., are defined using single curly braces and percent signs and must be terminated with an end tag, tags must appear in pairs, such as { if archive.Id == 10 } This is the document with ID 10 { endif }. Within the system.
The root directory of AnqiCMS template is /template, each template set needs to create its own template directory under /template, and add a config. configuration file in the template directory to specify some information about the template.The content format of the config. file is: { "name": "Default template", "package": "d"}
AnqiCMS template, using .html as the template file suffix, and stored in the /template template folder. The styles, js scripts, images, and other static resources used by the template are stored separately in the /public/static/ directory.The use of template files is similar to the tag syntax of Django template engine, variables are defined using double curly braces, such as {{variable}}. Conditions