Add file-based locking to cache files
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 32
- Forks
- 0
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
To better support concurrency, add a Cache.lock primitive which would look something like
with cache.lock(prefix, url) as lock:
previous = lock.get(schema_version)
# ...
lock.save(current)
While a lock is held on a file, any other attempt at acquiring that lock should block.
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 locating the Cache implementation and the code that reads and writes cache files. Define the Cache.lock(prefix, url) entry point around the shown get/save usage, then verify that concurrent attempts for the same file block until the lock is released.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100