I try to make a basic search engine to display TV show.
The user can type a name… It calls the TVMaze API … and display Picture of corresponding shows.
BUT …
If the user type another Name (after a First search) … The List displays firt the old picture and then refresh.
=> Is there a way to avoid this unpleasant display experience and clear the cache before displaying the results ?
As you say this is because the cache still has the old data. Arguably this is better than having a blank screen which would happen if you could clear the cache.
A solution would be to put a spinner overlay using the countdown component that shows for a second or two and then when it disappears you have the correct screen underneath.