Open amyewang opened 4 days ago
OK, so the docstring and the functionality need to be brought into line - can you please make the PR? Ideally we should have the same behaviour between implementations, so the change might be in fsspec.dircache . I don't mind which sentinel value means "no caching", especially since we also have use_listings_cache
. I suppose an expiry time of 0 could be understood as no caching, or as no expiry (i.e., use cache and never make stale).
When using
GCSFileSystem
, I would expect passing incache_timeout = 0
to result in no caching, since according to the docs:Set cache_timeout <= 0 for no caching, None for no cache expiration.
Yet whencache_timeout = 0
,self.cache_timeout
is set toNone
and caching is being used.When
cache_timeout = 0
,self.cache_timeout = cache_timeout or kwargs.pop("listings_expiry_time", None)
is evaluating toNone
, since the value of0
is falsy. Currently circumventing this by passing incache_timeout = -1
, but docs state that a value of0
should be supported and indicate no caching.