-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cache timeout and directory cache #216
Conversation
@martindurant Is there a standard schema for what entries in DirCache should look like? I see that
Standardizing the structure here would be good (maybe in a dataclass?), but I'm not sure what all to include yet. |
For (Pdb) pp out[:2]
[('__init__.py',
{'modify': '20190813183127',
'name': '/__init__.py',
'perm': 'r',
'size': 0,
'type': 'file',
'unique': '1000004g2058413d7'}),
('__pycache__',
{'modify': '20191127162327',
'name': '/__pycache__',
'perm': 'el',
'size': 0,
'type': 'dir',
'unique': '1000004g206bad42b'})] those are all the files under the path (the key). For These are inconsistent. At the moment, I'm leaning toward a namedtuple structure like CacheItem = namedtuple("CacheItem", ["name", "details"]) where |
The canonical structure should be:
The FTP case is clearly based on the output of the client library, and ought to be processed into canonical form, as it done for s3, gcs... |
i.e., the key is the path that we did a listing for |
This still looks useful to me |
Superceded by #243 |
Closes #215
WIP for now, I need to incorporate #215 (comment).