Add filter to allow cache locking to be disabled.

See websharks/quick-cache#387