Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Option to reset Opcode cache when clearing the cache #489

Closed
raamdev opened this issue May 30, 2015 · 7 comments
Closed

Feature Request: Option to reset Opcode cache when clearing the cache #489

raamdev opened this issue May 30, 2015 · 7 comments

Comments

@raamdev
Copy link
Contributor

@raamdev raamdev commented May 30, 2015

Forked from #342 (comment).

The new PHP 5.5+ Opcache extension allows resetting the Opcode cache via opcache_reset(). ZenCache should have a new option panel called "Opcode Cache" that includes a button to manually reset the Opcode cache, along with an option to disable automatic Opcode cache resetting whenever the ZenCache cache is cleared (the default would be enabled).

This panel can also include a PHP code snippet and reference to the "Process Other Custom PHP Code?" section inside ZenCache → Plugin Options → Clearing the Cache in case the site owner wants more advanced control over this functionality.

@isaumya
Copy link

@isaumya isaumya commented Jun 2, 2015

👍

1 similar comment
@jaswrks
Copy link

@jaswrks jaswrks commented Jun 3, 2015

👍

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Sep 18, 2015

@jaswsinc The new "Clear the OPCache Too?" option is located in the new "Manual Cache Clearing" section of the options, which I assume means that it applies only to the "Clear Cache" button, not to any automatic cache clearing routines (there's no corresponding option inside the new "Automatic Cache Clearing" section as I would've expected).

Can you confirm if this was intentional or if you just overlooked it?

2015-09-17_22-16-43

@raamdev raamdev reopened this Sep 18, 2015
@jaswrks
Copy link

@jaswrks jaswrks commented Sep 18, 2015

The OpCache is only cleared in the following circumstances:

  • If enabled in the manual section, and you clear the cache manually.
  • If enabled in the manual section, and ZenCache clears the entire cache manually and/or automatically. This occurs rarely. Generally speaking, it occurs only when you change the plugin options and/or an upgrade of the software occurs.

I don't think the OpCache should ever be cleared in an automatic way otherwise, because the OpCache really only needs to be cleared whenever filesystem changes occur; i.e., when ZenCache options change and the advanced-cache.php file is rewritten, or when a site owner clears the entire cache and they want to know that everything is being cleared.

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Sep 18, 2015

@jaswsinc Thanks for the clarification! :-)

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Sep 18, 2015

Next Pro Release Changelog:

  • New Feature! When your server has the PHP OPCache Extension installed, ZenCache can now be configured to also clear the PHP opcode cache whenever you clear the cache manually using the ZenCache "Clear Cache" button. See ZenCache Options → Manual Cache Clearing → Clear the PHP OPCache Too? (note that this option only appears if you have the OPCache Extension installed). Props @jaswsinc. See Issue #489.
@raamdev raamdev closed this Sep 18, 2015
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Oct 2, 2015

ZenCache Pro v151002 has been released and includes changes from this GitHub Issue.

See the ZenCache Pro v151002 release announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#489).

@wpsharks wpsharks locked and limited conversation to collaborators Oct 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants