Clear Cache for List display

Hello !

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.
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 ?

Here is a video to show the problem.

thanks for your help !


Enregistrement de l’écran 2022-11-23 à 18.04.13

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.

1 Like

Thanks for your answer and advise.
I’ll try this solution in my project.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.