File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,14 @@ class GCSFileSystem(asyn.AsyncFileSystem):
210
210
GCSFileSystem maintains a per-implied-directory cache of object listings and
211
211
fulfills all object information and listing requests from cache. This implied, for example, that objects
212
212
created via other processes *will not* be visible to the GCSFileSystem until the cache
213
- refreshed. Calls to GCSFileSystem.open and calls to GCSFile are not effected by this cache.
213
+ refreshed. Calls to GCSFileSystem.open and calls to GCSFile are not affected by this cache.
214
+
215
+ Note that directory listings are cached by default, because fetching those listings can be expensive. This is
216
+ contrary to local filesystem behaviour. The cache will be cleared if writing from this instance, but it can
217
+ become stale and return incorrect results if the storage is written to from another process/machine.
218
+ If you anticipate this possibility, you can set the use_listings_cache and listings_expiry_time arguments
219
+ to configure the caching, call `.invalidate_cache()` when required, or pass `refresh=True` to the
220
+ various listing methods.
214
221
215
222
In the default case the cache is never expired. This may be controlled via the ``cache_timeout``
216
223
GCSFileSystem parameter or via explicit calls to ``GCSFileSystem.invalidate_cache``.
You can’t perform that action at this time.
0 commit comments