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

Bust cache of specific endpoint when PUT/DELETE request with other endpoint #48

Description

@ViVa98

I have a model with 3 fields containing {id(auto-generated), username, email}

I have modified the default GET endpoint to "username" instead of "id" to search specific record based on username like
GET /profiles/someusername

But for PUT/DELETE I'm using "id" as the endpoint PUT/DELETE /profiles/random_generated_id

Whenever I use PUT/DELETE, data changes in the database, the previously cached data of different endpoint is not busting. I'm thinking of extending those PUT/DELETE API and manually deleting the specific endpoint's cache.

Help me get out of this situation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions