FreshRSS icon indicating copy to clipboard operation
FreshRSS copied to clipboard

Clear cache while adding a new feed

Open aledeg opened this issue 4 years ago • 12 comments

Closes #3658

Changes proposed in this pull request:

  • Remove cache feed when adding it

How to test the feature manually:

  1. Click on the bookmarklet to add a feed
  2. Do not save the new feed
  3. Click again on the bookmarket

Pull request checklist:

  • [x] clear commit messages
  • [x] code manually tested
  • [ ] unit tests written (optional if too hard)
  • [ ] documentation updated

Additional information can be found in the documentation.

Before, the feed cache was preventing to add a feed when using twice the bookmarklet if the first time the user aborted the process. Now, the cache is removed for the feed before loading information. This behavior as a limited impact since only the selected feed cache is removed.

aledeg avatar Jun 02 '21 13:06 aledeg

@Alkarex This works well for the bookmarklet use-case. I don't know if it has side-effects though. Could you validate that I did not miss something? Thank you!

aledeg avatar Jun 02 '21 13:06 aledeg

It also solves another very related bug if you add a feed from one user account, and immediately add it in another user account. There are several small cache issues like that, in particular when there are errors (error information is not persisted correctly).

Alkarex avatar Jun 02 '21 15:06 Alkarex

It is not the proper fix, but that is probably better than what we have at the moment. Maybe we should add a TODO though

Alkarex avatar Jun 02 '21 15:06 Alkarex

Hold on, I think this creates a new bug, when adding a feed using auto-discovery, deleting it, and adding it again (or add the same feed in two different users)

Alkarex avatar Jun 02 '21 15:06 Alkarex

As I mentioned in the original issue, we might just add something in the documentation because it is an edge-case.

aledeg avatar Jun 02 '21 15:06 aledeg

This is not completely trivial. When adding a feed with auto-discovery (i.e. provide https://example.net/ instead of https://example.net/rss.xml ), more than one cache file is created and apparently deleting only one creates other bugs. As this is not a regression, I suggest we release 1.18.1 very soon (e.g. latest this week-end if there is no other feedback) and come back to a proper cache improvement afterwards

Alkarex avatar Jun 02 '21 15:06 Alkarex

Sounds good!

aledeg avatar Jun 02 '21 16:06 aledeg

any news?

math-GH avatar Jul 12 '21 20:07 math-GH

any news?

I need to take some time to work on it, and it is not completely trivial. I would like to complete a couple of other work-in-progress PRs before

Alkarex avatar Jul 24 '21 20:07 Alkarex

A year later, are here any news?

math-GH avatar Aug 21 '22 20:08 math-GH

A year later, are here any news?

Time is flying! :-D

Alkarex avatar Aug 21 '22 21:08 Alkarex

I haven't been active in months. We might close that for now.

aledeg avatar Aug 23 '22 20:08 aledeg