Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

Flag previous calls as invalid #52

@JensGM

Description

@JensGM

This could possibly be done by scrambling the result hashes

    def invalidate(self, call, func=None):
        if not self.completed(call, func):
            return

        namespace = self.store / 'results' / call

        hash = func.hash if func is not None else namespace['latest']

        sha256 = hashlib.sha256(bytes.fromhex(hash))
        sha256.update(secrets.token_bytes(32))
        distorted = sha256.hexdigest()

        namespace[distorted] = namespace.pop(hash)
        if namespace['latest'] == hash:
            namespace['latest'] = distorted

Metadata

Metadata

Assignees

No one assigned

    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