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

"Current Wasted" % always grows when object cache is enabled #23

Open
fidoboy opened this issue Jan 10, 2025 · 3 comments
Open

"Current Wasted" % always grows when object cache is enabled #23

fidoboy opened this issue Jan 10, 2025 · 3 comments

Comments

@fidoboy
Copy link

fidoboy commented Jan 10, 2025

I've noticed that the percentage is growing slowly but can't understand why. It doesn't happens when the object cache is disabled. I've tried disabling preloading menus, translations, etc. but can't get it working as expected.

What alse can I try?

@nawawi
Copy link
Owner

nawawi commented Jan 10, 2025

Hi there,

"Current Wasted" is related to OPcache. When enabling Object Cache, cached files in "wp-content/cache/docket-cache" will be cached by OPcache. It is more of a server-level OPcache setting. You need to fine-tune the OPcache settings.

Thanks.

@fidoboy
Copy link
Author

fidoboy commented Jan 12, 2025

Hi there,

"Current Wasted" is related to OPcache. When enabling Object Cache, cached files in "wp-content/cache/docket-cache" will be cached by OPcache. It is more of a server-level OPcache setting. You need to fine-tune the OPcache settings.

Thanks.

I know about that, but issue is that it only grows when Docket Cache is enabled. It doesn't happen if it's not. So it's an issue related with the object cache. May be you could know about where to start to search. Also I'm not sure if it's the regular behavior of the plugin or it's not.

@nawawi
Copy link
Owner

nawawi commented Jan 12, 2025

only grows when Docket Cache is enabled. It doesn't happen if it's not. So it's an issue related with the object cache

Docket Cache writes its cache as a PHP file. When OPcache is enabled on your site, the cache files will be cached by OPcache to store them in memory. Therefore, there is no need to read the cache file because it is already in memory. This behaviour will improve the cache performance.

If OPcache is not enabled on your site, Docket Cache object caching still works, but the performance is not as good as when has OPcache.

May be you could know about where to start to search. Also I'm not sure if it's the regular behavior of the plugin or it's not.

Docket Cache only uses OPcache to improve the cache performance. It can't control OPcache behaviour or settings, as that must be done at the server level.

You may exclude Docket Cache cache files from being cached by OPcache using this opcache.blacklist_filename directive:

opcache.blacklist_filename=/your-wordpres-root-path/wp-content/cache/docket-cache/*-*.php

Please refer to the link below to understand better:

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants