Prestafan33 Posted June 30, 2020 Share Posted June 30, 2020 (edited) Hay algunas tiendas que van conectadas a un ERP, o donde los productos se suben o se modifican a través de aplicaciones externos. En estos casos puede ocurrir que se hagan modificaciones en los productos y no se vean reflejadas inmediatamente en la portada de la tienda debido a la caché de Prestashop. Parecido puede ocurrir con algunos módulos que muestran información de fuentes externas (por ejemplo, desde Facebook, Instagram o un blog externo), que a veces pueden actualizar la información y a pesar de eso que siga apareciendo en portada de la tienda la antigua, debido a que está cacheada. Para todos esos casos se puede utilizar este módulo. Solo hay que instalarle, activarle e indicar cada cuánto tiempo se quiere que se borre la caché (por ejemplo, cada hora). Transcurrido ese periodo de tiempo, se efectuará automáticamente un borrado de la caché. También se puede elegir la activación mediante CRON, proporcionando una URL cuya llamada es posible programar en el CRON del servidor con el intervalo que se quiera para efectuar el borrado de la caché. Versión 2.1.0 disponible para Prestashop 1.6 y 1.7: ftm_cacheclear.zip Edited July 5, 2020 by Prestafan33 (see edit history) 7 5 Link to comment Share on other sites More sharing options...
speedcrash2013 Posted July 5, 2020 Share Posted July 5, 2020 Hello. this module works with all versions of prestashop 1.6 and 1.7 ? Link to comment Share on other sites More sharing options...
Prestafan33 Posted July 5, 2020 Author Share Posted July 5, 2020 (edited) It's tested only with 1.7.x versions. Indeed, I think it can also work with 1.6 versions, because the only hook it's using was also at 1.6 versions, and it's also using "old" translation system, but I didn't tested it yet. If you want to try, the only you have to do is to open file ftm_cacheclear.php before installation, and modify #30 line from: $this->ps_versions_compliancy = array('min' => '1.7.0.0', 'max' => _PS_VERSION_); to $this->ps_versions_compliancy = array('min' => '1.6.0.0', 'max' => _PS_VERSION_); Please, if you test it and it's working nicely let me know to make this change permanent. Edited July 5, 2020 by Prestafan33 (see edit history) Link to comment Share on other sites More sharing options...
Prestafan33 Posted July 5, 2020 Author Share Posted July 5, 2020 8 hours ago, speedcrash2013 said: Hello. this module works with all versions of prestashop 1.6 and 1.7 ? I tested it in v1.6 Prestashop installation and it's working right, so I changed versions compliance info and uploaded it again in first post of this thread. Link to comment Share on other sites More sharing options...
luisisra01 Posted October 9, 2020 Share Posted October 9, 2020 Muchas gracias, si sirve el módulo 👌 Link to comment Share on other sites More sharing options...
Petar Posted December 17, 2020 Share Posted December 17, 2020 Thanks a lot for this usefull module. 1 Link to comment Share on other sites More sharing options...
YoJoe Posted January 11, 2022 Share Posted January 11, 2022 (edited) On 7/5/2020 at 5:20 PM, Prestafan33 said: Hello I found your module and wanted to check if it works in the same way as my own small, raw module. Since you use the same methods: Tools::clearSmartyCache(); Tools::clearXMLCache(); Media::clearCache(); Tools::generateIndex(); I wonder it this solution really works. After launching this by invoking proper url or through cron, the /var/cache/prod isn't flushed, and all files inside remain. The only difference is index file that is being somehow refreshed or reindexed. Is that supposed to be so? According to clear cache button in backoffice this isn't working the same, as it doesn't flush the var/cache/[prod] directory. I'm wondering about adding a onliner bash script and invoke it through cron, or just delete the directory using php. But still I'm not sure how above mentioned methods work. Edited January 11, 2022 by YoJoe (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now