Allow using a heuristic with the `doesitcache` tool
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 505
- Forks
- 149
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
Often times CacheControl be confusing b/c something seems like it should be cached, but it is not. There is typically a good explanation for this and work around that comes in the form of heuristics. It would be helpful for the doesitcache tool to accept a heuristic.
Specificially:
- doesitcache --list-heuristics - list the available heuristics and print the docstring of the classes
- doesitcache --heuristic $NAME - Apply an heuristic. There might be options that need to be passed in, which seems to go above and beyond at the moment. Just making sure heuristics have defaults should be enough
- doesitcache --heuristic $PATH - Use the file to load a python object as the heuristic. The algorithm would be to import it and see what classes are instances of the heuristic base class, choosing the first one to apply.
Docs!
Thanks to @sigmavirus24 for the suggestion!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the doesitcache CLI entry point and the heuristic base classes. Review how heuristics are discovered and instantiated, then implement the requested listing, named heuristic, and Python-path modes with default options; done includes documenting the new options and behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100