Skip to content

Add command to view the download cache #313

Description

@goodmami

Is your feature request related to a problem? Please describe.

There is no good way to view and clean up the cache. There is wn.config.get_cache_path(), but it's not convenient as one would need to know the URL.

Describe the solution you'd like

Something like this:

$ python -m wn cache
0f5371187dcfe7e05f2a93ab85b4e1168859a5c2  oewn:2025+  https://en-word.net/...
e25af66e46775b00d689619787013e6a35e5cbf7  oewn:2025   https://en-word.net/...
3aef6bc5b31087b768bc7d40a9f2963cfe03dc9c  omw:2.0     https://github.com/...
[...]
$ python -m wn cache oewn:2022
3e786e15b7f43627beddafdfa4a95807a5b12cf7  oewn:2022   https://en-word.net/...
c89ce73144c15fce143ee766c73fbd14e86bb71c  oewn:2022   https://github.com/...
$ python -m wn cache oewn:2022 --clear -v
Removing 3e786e15b7f43627beddafdfa4a95807a5b12cf7
Removing c89ce73144c15fce143ee766c73fbd14e86bb71c
2 cache entries removed

These commands would likely be backed by some public API Python functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions