Hello! As an experienced website operations expert, I fully understand the confusion and anxiety you may feel when you update the AnQiCMS backend settings and find that the front end does not take effect immediately.This is a very common phenomenon in website operation, usually not a system failure, but a mechanism designed to improve website performance and user experience is at work.Today, let's delve into the possible reasons behind this and provide detailed solutions.

AnQiCMS backend contact information update, why does the front-end not take effect immediately?

When you have worked hard in the AnQiCMS background to modify the contact information, only to find that the front page still displays the old information, it usually means that you have encountered a common 'cache' problem. AnQiCMS, as an enterprise-level content management system developed based on the Go language, one of its design philosophies is to provideHigh-performance architectureandAn efficient content management solution. To achieve this, the system widely uses various caching mechanisms to accelerate page loading and response speed, thereby enhancing user experience and search engine friendliness.

In simple terms, your website content may be 'temporarily stored' at multiple stages before being accessed by users, so that the next time users visit, they can directly read these temporarily stored data instead of regenerating it from the database each time.This can greatly reduce the server load and speed up the page display speed.

What specific stages of caching may have caused the contact information to be updated in a timely manner?

  1. AnQiCMS Internal Cache:The AnQiCMS system itself is designed to improve running efficiency, caching some global settings, configuration information, and even some page content of the website.This means that even if you modify the data in the background and save it to the database, the system may still directly call the previously cached old data copy when responding quickly.This is the most common and direct reason.

  2. Browser Cache (Client Cache):Your browser also plays the role of a 'cacher'.When you visit a web page for the first time, the browser will intelligently store some static resources on the page (such as CSS styles, JavaScript scripts, images, and even the entire HTML structure of the page) locally.Next time you visit the same page again, the browser will check the local cache first.If it thinks the locally cached version is still "fresh and valid", it will load it directly without requesting the latest content from the server.It is clearly mentioned in the AnQiCMS documentation, for example, after uploading an image, if the front-end is not updated, it is necessary to 'clear the local browser cache', which is a hint for this mechanism.

  3. CDN or Reverse Proxy Cache (Middle Tier Cache):Many websites to improve access speed and security will deploy content distribution networks (CDN) or reverse proxy servers (such as Nginx, Apache).CDN will distribute your website content to servers closer to the users, while the reverse proxy acts as a front-end for your website server, handling user requests.These intermediate layers will also cache web content. When users request a page, the CDN or reverse proxy may directly return old data from its cache without asking whether there is the latest content on the AnQiCMS server.This is often involved in the AnQiCMS Docker deployment tutorial, for example, configuring Nginx/OpenResty/Apache for reverse proxy in 1Panel, Baota panel, and these proxy layers may also have caching functions.

  4. Template Call Issue (Very Rare Cases):Although the possibility is small, if there is an error in calling the template tag of the contact information by you or your template developer, or if the contact information is accidentally hardcoded into the template file instead of through AnQiCMS provided{% contact %}tags (refer todesign-tag.mdandtag-contact.md),then the front-end cannot obtain the data correctly even if the background data is updated.

After understanding these possible reasons, let's see how to investigate and solve the problems one by one.

Solution and troubleshooting steps

In the case of front-end information not being updated, you can check and operate according to the following steps:

  1. Clear the AnQiCMS internal cache:This is the most direct and most effective solution. The AnQiCMS backend usually provides a 'Clear Cache' or 'Update Cache' function button.

    • Operation instructions:Log in to the AnQiCMS backend, navigate to "System Settings" or "Dashboard Home", and you will find a feature named "Update Cache" (refer tohelp-index.mdThe introduction of the "Update Cache" module). Click this button to force the AnQiCMS system to clear its internal stored old data and reload the latest configuration information.After the operation is successful, please check the front desk immediately.
  2. Clear browser cache: Even if the AnQiCMS internal cache has been cleared, your browser may still stubbornly display the old version.

    • Operation instructions:
      • Hard refresh:Try pressing on the front page,Ctrl + F5(Windows/Linux) orCmd + Shift + R(macOS) Keyboard shortcut, this will force the browser to reload all resources from the server, ignoring local cache.
      • Manually clear:If a hard refresh does not work, you may need to go to the browser settings and manually clear the 'Cached images and files' in 'Browsing data'.The specific steps may vary depending on the browser, usually in the "History" or "Privacy and Security" settings.
  3. Refresh CDN or reverse proxy cache:If your website uses CDN services (such as Alibaba Cloud CDN, Tencent Cloud CDN, etc.) or has configured reverse proxy caching, you need to perform operations on the corresponding management platform.

    • Operation instructions:
      • CDN:Log in to your CDN service provider's console and find the "Refresh Cache" or "Content Refresh" feature.You can choose to refresh a specific URL (i.e., the contact page URL of your website) or perform a full site refresh (but a full site refresh may cause a slight decrease in website access speed in the short term).
      • Reverse Proxy:If you are setting up a reverse proxy server (such as Nginx) yourself, you may need to restart or reload its configuration. For example, for Nginx, you can connect to the server via SSH and executesudo systemctl reload nginxorsudo systemctl restart nginxcommand.
  4. Check the template code:If the above steps do not solve the problem, you need to check the website's template file.

    • Operation instructions:Confirm your frontend template file (usually located/templatethe directory and use.htmlsuffix, referencedesign-convention.mdIn it, did you correctly use the contact information tags provided by AnQiCMS?
      • Search for similar{% contact with name="Cellphone" %}or{% contact with name="Address" %}code (referencetag-contact.md)
      • ConfirmnameDoes the value match the field name defined in the "Contact Information Settings" on the AnQiCMS backend (refer tohelp-setting-contact.md)
      • Check if there are any hard-coded old contact information in the template, and if so, replace them with dynamic tags.
  5. Review the system logs (advanced troubleshooting):If the above method is still ineffective, the problem may be more complex. You can check the AnQiCMS runtime log, which may reveal potential error information.

    • Operation instructions:AnQiCMS as a Go language application, usually outputs running logs to the console or to a specified file (for example, in the Baota panel Go project configuration, there will berunning.logFile, referencestart.mdCheck if any of these log files contain any