Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

invalidate args should be optional #193

@fes300

Description

@fes300

at the moment invalidate API always asks you to specify a unique key of the cache (aka input) to invalidate (unless the type of input is the singleton type, in which case it is inferred automagically). This means that you don't have a way to invalidate a whole Cache, only its single entries. I argue that in the lifecycle of an App session, data is often fetched for just one combination of input and this strictness adds unnecessary boilerplate.

Think of a user query that takes a password and a username, there will always be a unique user in memory and we want to wipe the whole cache when the user logout. It would be nice to be able to wipe the whole Cache without specifying the single key.

The proposal is to always allow empty inputs when invalidating a cache, with the logical addition that no input == whole cache invalidation, which is (probably not by chance) also the logical consequence of invalidating a query that accepts no params.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FE maintproposalissues describing early stage proposals that needs to be further discussed before implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions