Skip to content

Problem with deleting entries #129

@mebibou

Description

@mebibou

I want to add a route that can be used to delete a cache entry, so that next time that specific cache route is called it will re-fetch the content.

However, it doesnt really work:

  1. I call the route /get/foo that is cached for 1h
  2. I delete the entry /get/foo: cache.del('/get/foo'). The callback return value says 1: OK
  3. I call the route /get/foo again, strangely the response code is 304 even though I deleted the cache entry
  4. I call the route /get/foo again, and again and again and it is always status 304
  5. If I try to delete again the cache entry with cache.del('/get/foo') it returns 0, event though I called that same endpoint multiple times after deleting the entry
  6. If I do cache.get((err, entries) => console.log(entries)) at that moment, it shows no entry

It seems after you delete an entry once, it just never shows again? we can never delete it again? or is it not how to delete entries manually?

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