feedbin / feedbin-api

Feedbin API Documentation
349 stars 26 forks source link

Deleting a saved search doesn't invalidate the http cache #42

Closed fortybillion closed 4 years ago

fortybillion commented 4 years ago

When requesting the saved_searches index at /saved_searches.json, the server responds with a 304 with a last-modified header of sometime in the past.

If a new saved search is created via API, the index request updates normally with a last-modified timestamp reflecting the creation of the new saved search.

However, if a saved search is deleted via API, the last-modified header from the index call retains its original date, thus preventing clients from updating the list of saved_searches correctly.

benubois commented 4 years ago

Hi @fortybillion,

Thanks for reporting this! Last-Modified with a deleted item is is tricky and I haven't found a good way to express this with Rails. However the Etag header should now change when a saved search has been deleted, so you could still take advantage of HTTP caching with an If-None-Match request.

Thanks,

Ben