Thank you for your question, try to answer the best I can.
1. Can Docket Cache be used with redis?
No. Docket Cache is an alternative to Redis/Memcache or any in-memory cache. Both Docket Cache and Redis plugins use WordPress object-cache.php drop-in file. Currently, it is not possible to use both.
2. What about with varnish?
Yes, it is possible. Varnish is a Web Proxy that operates the same as Squid or Cloudflare and it is for front-end (page cache). Docket Cache works on the back-end (object cache).
3. What are the ideal settings for a regular website and for a woocommerce store?
The default settings are suitable for regular or woocommerce websites. For specific optimisation settings, it depends on website setup theme, plugins and others.
You may try to start with disable all settings and leave only “Advanced Post Caching”, “Optimize WP Query” and “Optimize Term Count Queries”. For WooCommerce, enable all settings in “WOO TWEAKS” sections.
Use Ramdisk/Tmpfs to store the cache files. Please refer to https://docs.docketcache.com/faq#what-is-a-ram-disk-in-docket-cache.
4. Lastly, Docket Cache shows OPcache not available, but I checked and it’s enabled on the server
Docket Cache detect if OPcache enables or not by using this logic function:
public function is_opcache_enable()
{
try {
return @ini_get('opcache.enable') && \function_exists('opcache_reset');
} catch (\Throwable $e) {
// rare condition on some hosting
nwdcx_throwable(__METHOD__, $e);
}
return false;
}
File: https://github.com/nawawi/docket-cache/blob/master/includes/src/Filesystem.php#L505
– If OPcache enables by setting “opcache.enable” to “1” at php.ini or other method configuration.
– If OPcache extension (opcache.so) loaded and ready to use by checking “opcache_reset” function exists.
You may try to run the command below to confirm the server setting and try to restart the apache/nginx and php-fpm service.
# php -m |grep -i opcache
Zend OPcache
Zend OPcache
# php -i |grep opcache.enable
opcache.enable => On => On
opcache.enable_cli => Off => Off
opcache.enable_file_override => Off => Off
Thanks.