cache not store using POST method. HTTP 504 Unsatisfiable Request (only-if-cached) error
@EklakDangaura5 жыл бұрын
Damn, this is fast. Just had a look at the repo this morning.. now the video. Thanks. :)
@codingwithmitch5 жыл бұрын
I didn't think I'd do it until tomorrow, but I got inspired.
@pradeepkumarreddykondreddy70484 жыл бұрын
when max-stale value set to less than 1 day, caching is not working. Any reason for that ?
@jegali4 жыл бұрын
Hi Mitch, I have to cache aurora forecast data from services.swpc.noaa.gov which is 2MB in size. I managed to download, parse and save the data as a String to the Room Database, but if I try to select the data from the database I am told the data is too big. Do you have any suggestions how to handle this?
@rudreshsp32363 жыл бұрын
how to cancel a retrofit request used in executor , plz share video
@ikhiloyaimokhai99744 жыл бұрын
Really great tutorial and explanation. When Room is used for caching, how often would the data be refreshed from the network?
@syyamnoor97924 жыл бұрын
It doesn't suck, it's just the implementation that does. Why don't you use just hit one api to fetch all the data and store it in a list etc, and then cache it. For searching we can avoid using other api hits like photos/{id}, we can simply search from that cached list.
@codingwithmitch4 жыл бұрын
its shit. You should cache with room
@abuzarshaikh35965 жыл бұрын
Great tutorial! cache can be modified or edited?
@Hereisthething5 жыл бұрын
thanks for the video mitch and to clarify the retrofit cache is just in-memory right? i.e. if you kill the app and restart the app when you are offline, there is no cached data
@codingwithmitch5 жыл бұрын
It's saved to a file. It persists if the app dies I believe.
@ayoubmazrou88004 жыл бұрын
I have a question , I don't know how to create a recyclerview of videos ? , I saw your implementation but it doesn't works in my own project
@salmanhameed94955 жыл бұрын
How to cache a post request using retrofit ?
@codingwithmitch5 жыл бұрын
You can't
@fazalcs48204 жыл бұрын
Mitch can you make the tutorial on Store library for storing data
@zuhrulanam59713 жыл бұрын
I cant force update new data, retrofit always caching I have tried with no cache and also force network. Thanks bro
@jawadahmed61905 жыл бұрын
Hi mitch how to use retrofit cache in this secenario? When we have internet save data in cache but dont use .But if we dont have internet we use cache .
@codingwithmitch5 жыл бұрын
That's what it does by default
@jawadahmed61905 жыл бұрын
@@codingwithmitch Oh thanks. I didn't know that.
@salmanhameed94955 жыл бұрын
you didn't make serviceGenerator class' constructor private so, how it could be singleton ?
@codingwithmitch5 жыл бұрын
You got me
@RB-xx3xf5 жыл бұрын
Very good job ! Thanks for the video !
@Daaaaaaavid2 жыл бұрын
Few years after and I used it, didn't understand why it should be so bad, if you cache it a db you also cache the whole response? My app loads a list from a rest api using retrofit, the caching works wonderfully, don't see the problem.
@luiferadventures5 жыл бұрын
and what about Glide?
@TBadalov8 ай бұрын
This doesn't make retrofit caching any less. What you were describing are two different layers of caching. One can still use room to cache complex data structures which are still eventually retrieved via API call. One doesn't contradict another
@barakerzeonlist46085 жыл бұрын
I love your tutorial I'm learning java now just soon I'll be developer
@sergeyyjyakunin15143 жыл бұрын
Did you become a developer?
@muraddadasov85955 жыл бұрын
teacher should i go for both mvp and mvvm or only one?
@codingwithmitch5 жыл бұрын
Use one architecture per application IMO. But that is just my opinion. More than one would get confusing I think
@muraddadasov85955 жыл бұрын
@@codingwithmitch thank you much
@JacobZinn-rs1we2 жыл бұрын
It's true... retrofit caching really does suck. I spent 4 hours on it and it never hit cache. I spent 1 hour on room and it works great!
@muraddadasov85955 жыл бұрын
we love you keep going.
@muraddadasov85955 жыл бұрын
please make more application with rxjava. we learned but don't know where to use
@codingwithmitch5 жыл бұрын
Makes sense. I will do some examples of where it's commonly used.
@muraddadasov85955 жыл бұрын
@@codingwithmitch thank you for your response
@codingwithmitch5 жыл бұрын
@@muraddadasov8595 maybe I'll do a video where I show you 5 of the most common ways to use it or something
@muraddadasov85955 жыл бұрын
@@codingwithmitch thank you lot
@codinginflow5 жыл бұрын
Wow I don't believe Square created this shit! I am disappointed and a little bit sad.
@eaglepaul5 жыл бұрын
Thanks Mitch. Love u😍
@codingwithmitch5 жыл бұрын
😘
@jesselima_dev5 жыл бұрын
Great advanced tips!!!
@preenxus34255 жыл бұрын
You are dont use m-prefix?
@codingwithmitch5 жыл бұрын
I stopped doing that recently. Not for any particular reason.
@HabeshaDeveloper5 жыл бұрын
please make firebase realtime database pagination
@rohitmandiwal85674 жыл бұрын
None of the solution worked for me.. but yours :)
@preenxus34255 жыл бұрын
This is the many helpful. Thanks a lot!
@ArjunSingh-qt5jn4 жыл бұрын
Thankx brother - Vancouver
@maherabuthraa89754 жыл бұрын
You are right .. caching sucks .. mainly on server-side.. biggest pain is caching error . OMG
@muraddadasov85955 жыл бұрын
teacher. the thing that i didn't understand is maxStale. you assigned for 7 days. what happens after 7 days ?
@codingwithmitch5 жыл бұрын
Here you go my friend stackoverflow.com/questions/33818854/what-is-difference-between-max-age-and-max-stale-in-cache-control-mechanism
@highlightmatchoffootball49862 жыл бұрын
thank you so muchhh
@enricobrunodelzotto74865 жыл бұрын
Setting a cache on the network layer it's ok, but what you're doing here is kind of an hack. Override headers with interceptors could be ok for a *fast* demo, but, all that part of logic should be done by the server. The caching at app level should be done with the repository pattern, in the higher level! So i really really no encourage people to follow the hack approach!
@codingwithmitch5 жыл бұрын
I said not to do this... This is how you should cache github.com/mitchtabian/Local-db-Cache-Retrofit-REST-API-MVVM
@mohammedhamouda1044 жыл бұрын
love it
@chirantanchaudhury28095 жыл бұрын
very useful video for developers
@muraddadasov85955 жыл бұрын
please teacher make video about PageKeyedDataSource