Support » Plugins » How do I disable all file locking in W3 Total Cache?

  • File locking is “bad” on certain distributed/shared hosting environments that use NFS.

    WP Super Cache has a UI option to turn this off:
    “Coarse file locking. You probably don’t need this but it may help if your server is underpowered. Warning! May cause your server to lock up in very rare cases!”

    The text is very ambiguous, but checking this box corresponds to setting:

    $wp_cache_mutex_disabled = 1

    Then, the initialization of $mutex never happens which means no locking ever happens.

    I like W3 Total Cache much better and recommend this plugin to everyone I know. Unfortunately, I was unable to find a UI option that corresponds to file locking in W3 Total Cache. However, I found a few files that contain file locking options:

    ./w3-total-cache-config-default.php:    'minify.locking' => true, 
    
    ./lib/Minify/Minify/Cache/File.php:    public function __construct($path = '', $fileLocking = false)
    
    ./lib/Minify/Minify.php:     * @param bool $fileLocking (default = true) This only applies if the first parameter is a string.
    ./lib/Minify/Minify.php:    public static function setCache($cache = '', $fileLocking = true)

    I was unable to find any documentation as to which options to set, or what they really do… I changed the ‘minify.locking’ to false in the ./w3-total-cache-config-default.php and it did not seem to “break” anything, but I’m not really sure if it’s doing what I want and not locking any files.

    I guess my question is, “How do I disable all file locking in w3 total cache?” along with suggestion for adding a UI option.

    Note: I do not have root/sudoer on this one, nor is there access to any other caching options (ie: memcached, etc). I must use disk caching in this particular environment.

    Thanks!

Viewing 1 replies (of 1 total)
  • Frederick Townes

    (@fredericktownes)

    How do I disable all file locking in w3 total cache?

    In the currently available releases this is only available for minify by manually editing the configuration file value minify.file.locking. An option for all cache types is available in the next release coming soon.

Viewing 1 replies (of 1 total)
  • The topic ‘How do I disable all file locking in W3 Total Cache?’ is closed to new replies.