#1907·flysystem

a flag to the local filesystem adapter to optionally clear the NFS cache before certain calls

Author: Samuel-SalterCreated Jul 6, 2026Updated Sep 18, 2026

Feature Request

Adding a flag to the local filesystem adapter to optionally clear the NFS cache before certain calls.

I wrote PR to address this, I don't know if creating an issue was the proper process so I am doing that.

Q A
Flysystem Version any
Adapter Name local
Adapter version any

Scenario / Use-case

The issue I ran into was that is_dir as called in the directoryExists method of the local adapter was returning false in my AWS EFS setup for a directory that exists, and I could make it appear by calling ls. After some digging I found that NFS has a cache layer that isn't cleared by is_dir (which uses stat under the hood) but it is possible to warm that cache with other commands.

Summary

Adding an optional behaviour to the local flysystem, which cache busts at the file system level. I don't think the behaviour I am adding in appropriate for most circumstances, it is adding extra file system calls to some pretty basic requests, which only really make sense in an NFS context. So I thought it would make sense as a constructor boolean option, and it could be activated by people using network file systems who want to cache-bust and are willing to pay the performance cost.