New Proxy templates -> NGINX -> Caching without 'Empty Cache' button

Hello everyone

When a ‘web → nginx → caching’ template is created, HestiaCP doesn’t detect it as a cache template, even though it’s an exact copy, and the ‘Clear NGINX cache’ button doesn’t appear.

Where does Hestia store the name of the ‘caching’ template to display the button, or what script handles this logic?

And while we’re on the subject of caching, has anyone tried adding ‘proxy_cache_use_stale’ to redo the cache in the background after it expires (among other things)?

All the best :wink:

Hi,

In the file /usr/local/hestia/web/edit/web/index.php:

<?php if (!($v_nginx_cache == 'yes' || (($v_proxy_template == 'caching' || is_int(strpos($v_proxy_template, 'caching-'))) && $_SESSION['PROXY_SYSTEM'] == 'nginx'))) 

The template must be caching or contain the string caching- in the template name.

1 Like

Yes, when I saw the PHP line I realized my mistake. I had been using ‘_’ caching_1d.tpl.

So the best solution is to adjust the names.

Thank you so much, sahsanu

1 Like