Skip to content

feature: cache validation #11

@klindsay28

Description

@klindsay28

When I start up a new jupyter session, xpersist is assumes that cache files are correct.
This is not necessarily the case and it's kinda a hassle to work around this assumption.
It would be useful to attempt to validate cache file contents.

Based on advice of @dcherian, if token is computed as

token = dask.base.tokenize(self._func(*args, **kwargs))

the values are consistent across invocations and are computed relatively efficiently.

If this is done, then a potential approach for cache validation is to add this token to the object being cached, as an attribute. Then treat an existing cache file as correct if the token stored in the cache file matches the token for object.

Does this make sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions