Skip to content
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

support pathlib.Path #13

Open
karlicoss opened this issue Jan 8, 2020 · 2 comments
Open

support pathlib.Path #13

karlicoss opened this issue Jan 8, 2020 · 2 comments
Labels

Comments

@karlicoss
Copy link
Owner

Path is a trivial wrapper around str. I guess generally think of a good way to allow adhoc mapping of simple types.
Perhaps current Exception makes sense.

@ankostis
Copy link

ankostis commented Feb 11, 2021

Wouldn't be interesting to hash & compare the actual file it refers to see if it has changed, to invalidate the cache?
That way, promensia indexcould benefit if nothing has changed on disk.

@karlicoss
Copy link
Owner Author

Yep, this is the idea! Even the stat().st_mtime is probably a good proxy for the file modification time?

It's possible to support something like it, for example:
https://github.com/karlicoss/HPI/blob/ed47e98d5c85b3334b3be059ad31b82c6fc0d19c/my/emfit/__init__.py#L27-L33

Another example (which Promnesia already benefits from) is caching org-mode files -- it makes incremental indexing pretty instantaneous on my computer, at least

https://github.com/karlicoss/HPI/blob/e81dddddf083ffd81aa7e2b715bd34f59949479c/my/orgmode.py#L78-L81

but would be nice to make it 'native'!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants