Fix Cached Content

Sometimes when you are changing files and re-opening them quickly, Windows will cache the contents.

This is particularly problematic if you are modifying the files in Linux, and viewing the files in Windows.

To resolve this, disable level2 oplocks and enable kernel oplocks for the share or the whole server:

[homes]
    # this is the template for each user's home directory
    # don't specify a path, so we'll use the user's home dir
    path = /home/%u/
    comment = Your Home!
    writable = yes

    # always present consistent information
    level2 oplocks = no
    kernel oplocks = yes

    # don't show the 'homes' share in a browser
    browseable = no

Warning

This change comes with a significant performance penalty for some situations...