[Bug] Caching is not unique for classes with call function
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77
- Forks
- 7
- Avg merge
- 10h 32m
- Merged PRs (30d)
- 12
Description
For example
class Test:
def __call__(self, a, b):
return a+b
While the class definition is unique the instance Test() is not this results in a different hash and consequently the calculation is repeated rather than reloaded. So at the moment it is not recommended to use dynamically defined objects in combination with the caching feature.
Contributor guide
No contributing guide indexed for this repository
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 reproducing the issue's Test class with call and the caching feature, then trace how callable classes and their instances are represented for cache keys. Check whether repeated use of the same dynamically defined callable reuses the cached calculation, and document or test the observed behavior before changing it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100