Easy clean smartoptimizer's cache from admin

Hello,

while i’m using smartoptimizer on my site, after some changes I need to clean SO cache, and every time login true isn’t fastest way to do it. So I have decided to write small php script to clean cache from admin panel.

  1. Create your cache delete php file and name it as you want. for example cache_del.php
  2. In cache_del.php write this code:
<?php <br />
$dir = 'smartoptimizer/cache/';<br />
<br />
if(count((scandir($dir)))>2)<br />
foreach(glob($dir.'*.*') as $v){<br />
    unlink($v);<br />
}<br />
echo "<h1>Cleaning Smartopimizer's cache...</h1>";<br />
$ref = $_SERVER['HTTP_REFERER'];<br />
header( 'refresh: 0; url='.$ref);<br />
<br />
?>
```<br />
Where $dir = 'smartoptimizer/cache/'; write path to smartoptimizer cache dir, usualy smartoptimizer/cache/<br />
3. In admin panel's quick menu create link to cache delete php file.<br />
<br />
Thats it....

3. In admin panel's quick menu create link to cache delete php file.



how you do this ?

in admin you have the quick menu down the right side. go and add the link there