harshadyeola
10 years ago
2 changed files with 17 additions and 7 deletions
@ -1,11 +1,16 @@ |
|||||
#Clean all cache |
# Clean all cache |
||||
|
|
||||
function ee_cache_clean() |
function ee_cache_clean() |
||||
{ |
{ |
||||
#Clean fastcgi cache |
# Clean fastcgi cache |
||||
rm -rf $(grep fastcgi_cache_path /etc/nginx/conf.d/fastcgi.conf | awk '{ print $2 }' | sed 's/$/\/*/g') \ |
if [ -d /var/run/nginx-cache/ ]; then |
||||
|| ee_lib_error "Unable to clean fastcgi cache, exit status = " $? |
rm -rf /var/run/nginx-cache/* &>> $EE_COMMAND_LOG |
||||
|
fi |
||||
|
|
||||
#Clean memcache |
# Clean memcache |
||||
service memcached restart &>> $EE_COMMAND_LOG || ee_lib_error "Unable to clean memcache, exit status = " $? |
dpkg --get-selections | grep -v deinstall | grep memcached &>> $EE_COMMAND_LOG |
||||
} |
|
||||
|
if [ $? -eq 0 ];then |
||||
|
service memcached restart &>> $EE_COMMAND_LOG |
||||
|
fi |
||||
|
} |
||||
|
Loading…
Reference in new issue