Skip to content

Add file-based locking to cache files #34

@fluffy-critter

Description

@fluffy-critter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions