How to clear Zend Optimizer Cache via SSH Command line

General discussion forum for the Zend Server
Post Reply
mryanbyrd
Posts: 3
Joined: Mon Mar 22, 2010 5:51 pm

How to clear Zend Optimizer Cache via SSH Command line

Post by mryanbyrd » Mon Mar 22, 2010 5:53 pm

I can clear the Zend Optimizer+ cache in the web control panel by clicking the "Clear" link.

I'd like to be able to do that in an SSH session, logged into the web server.

How do I do that?

mryanbyrd
Posts: 3
Joined: Mon Mar 22, 2010 5:51 pm

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by mryanbyrd » Wed Mar 24, 2010 3:30 pm

are there directories of cached files somewhere I can delete to effect this change?

mryanbyrd
Posts: 3
Joined: Mon Mar 22, 2010 5:51 pm

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by mryanbyrd » Wed Mar 24, 2010 3:43 pm

looks like the Clear link calls the javascript function layoutManager.contentLoader('/ZendServer/Accelerator/Reset', '');

any ideas?

massimilianoc
Posts: 699
Joined: Thu Mar 12, 2009 11:58 am

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by massimilianoc » Thu Mar 25, 2010 4:09 pm

There are API function to handle such procedures.
What you can do is create a PHP script/s you place somewhere safe within your Apache 'DocRoot', accessible only on the localhost adapter, which run the function/s you need.

Once created, you can call the clear cache URLs from a bash script using wget, elinks or lynxs.

Beware that in Zend Server there are 3 different type of caches, related to each of the following modules:
  • Zend Optimizer+
  • Zend Data Cache
  • Zend Page Cache
All the Zend Server API functions you can find in the following link http://files.zend.com/help/Zend-Server- ... ction2.htm, just pick up the ones you need.
Best regards,
Massi.

godkillthemall
Posts: 33
Joined: Fri May 22, 2009 3:25 pm

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by godkillthemall » Sat Jan 15, 2011 11:06 pm

What about this?

Code: Select all

if (function_exists('accelerator_reset')) {
    return accelerator_reset();
}

serje
Posts: 1
Joined: Fri May 20, 2011 1:23 pm
Location: London
Contact:

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by serje » Fri May 20, 2011 1:24 pm

godkillthemall wrote:What about this?

Code: Select all

if (function_exists('accelerator_reset')) {
    return accelerator_reset();
}
And wha tabout it?
-------------------
android development
Last edited by serje on Mon May 23, 2011 11:28 am, edited 1 time in total.

User avatar
zend_eyalt
Posts: 277
Joined: Thu Jan 22, 2009 3:16 pm

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by zend_eyalt » Sun May 22, 2011 5:25 am

As Massi mentioned, you need to create that script in your docroot, and call it via your webserver.

O+ isn't supported in CLI, hence though accelerator_reset() may exist in CLI (as the O+ is loaded), it would not work (as it is disabled).

jharvey
Posts: 1
Joined: Wed Aug 03, 2011 8:20 am

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by jharvey » Wed Aug 03, 2011 8:23 am

Don't know if this will help anyone, but you can clear the cache immediately via the command line by restarting apache eg:

Code: Select all

apachectl -k restart
OR

Code: Select all

/sbin/service httpd restart

alex8394
Posts: 1
Joined: Fri Aug 05, 2016 2:17 am
Contact:

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by alex8394 » Fri Aug 05, 2016 2:19 am

serje wrote:
godkillthemall wrote:What about this?

Code: Select all

if (function_exists('accelerator_reset')) {
    return accelerator_reset();
}
And wha tabout it?
-------------------

Super!
I have earned . Thank you !

Anastasia Stefanuk
Posts: 1
Joined: Thu May 17, 2018 9:51 am

Re: How to clear Zend Optimizer Cache via SSH Command line

Post by Anastasia Stefanuk » Thu May 17, 2018 10:00 am

zend_eyalt wrote:
Sun May 22, 2011 5:25 am
As Massi mentioned, you need to create that script in your docroot, and call it via your webserver.

O+ isn't supported in CLI, hence though accelerator_reset() may exist in CLI (as the O+ is loaded), it would not work (as it is disabled).
Great, thank you!

_______________________________________________
laravel and reactjs

Post Reply