How to clear Zend Optimizer Cache via SSH Command line

General discussion forum for the Zend Server

How to clear Zend Optimizer Cache via SSH Command line

Postby mryanbyrd on 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

Postby mryanbyrd on 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

Postby mryanbyrd on Wed Mar 24, 2010 3:43 pm

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

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

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

Postby massimilianoc on 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-5/introduction2.htm, just pick up the ones you need.
Best regards,
Massi.
massimilianoc
 
Posts: 699
Joined: Thu Mar 12, 2009 11:58 am

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

Postby godkillthemall on Sat Jan 15, 2011 11:06 pm

What about this?
Code: Select all
if (function_exists('accelerator_reset')) {
    return accelerator_reset();
}
godkillthemall
 
Posts: 33
Joined: Fri May 22, 2009 3:25 pm

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

Postby serje on 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.
serje
 
Posts: 1
Joined: Fri May 20, 2011 1:23 pm
Location: London

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

Postby zend_eyalt on 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).
User avatar
zend_eyalt
 
Posts: 251
Joined: Thu Jan 22, 2009 3:16 pm

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

Postby jharvey on 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
jharvey
 
Posts: 1
Joined: Wed Aug 03, 2011 8:20 am

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

Postby alex8394 on 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 !
alex8394
 
Posts: 1
Joined: Fri Aug 05, 2016 2:17 am


Return to Zend Server

Who is online

Users browsing this forum: No registered users and 10 guests