CHANGE: clear replica cache when flushing or setting a file in the
workdirectory