OpenCart 3: Persistent Changes Despite Cache Clearing - Exploring Ocmod and Twig Caches
In OpenCart 3, a common issue arises when changes made to the \catalog\controller\product\product.php file fail to reflect on the product details page. After clearing the system cache and refreshing the page, the changes remain absent.
This behavior is attributed to two potential culprits within OpenCart's architecture: ocmod and twig caches.
Ocmod Cache
Ocmod is an OpenCart extension that allows for easy modification of core files without directly editing them. When changes are made to the core files, ocmod creates a cache to streamline subsequent requests. However, if the changes made to the core files are not reflected in the cache, it can lead to the observed issue.
To clear the ocmod cache, follow these steps:
Twig Cache
Twig is OpenCart's templating engine. It caches compiled templates to improve performance. When changes are made to the templates, the cache may not be automatically updated, resulting in the absence of those changes on the frontend.
To clear the twig cache:
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3