Skip to content

Allow @cache to ignore certain arguments #729

@AayushSabharwal

Description

@AayushSabharwal

A function may mark an argument to be ignored by @cache. The function is then responsible for making sure the value of that argument doesn't affect the validity of the cached result. This is useful for substitute, where we don't want to cache the dict of substitution rules. Instead, substitute uses a cached worker function and clears the cache every call. We could also have a flag if the user knows they're calling substitute with the same ruleset multiple times, to avoid clearing the cache.

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