I have a done a project in which data like name, url, desc are coming from server using web-service. Every time I need to parse it and then display. I want to use store parsed data in a particular are in which parsed data will be removed after five minutes. Is this possible to do that, if yes then how? I have searched lot and found one thing “mamcache” but not clear how can be used mamcache in Android
Edit
Actually in my app I have different category and clicking on every category, sending request to the server and then parsing it and then displaying. I don’t want to send request every time, so I think we should use some technique by which we download data when app runs first time and then store parsed data in a temporary location (this location will store data only for five minutes). I will check often if temporary location has data then fetch from there otherwise send request download, parse and then display.
Your description of what you need is a little vague, but if you need to persist parsed data you can build a model for your data to store it temporarily, or you can save the data to the application preferences which will be available across app instances.
If you can better describe exactly how you want to use the parsed data, I can give you explicit direction?
Edit
If you only need to persist data for a short period of time within the same activity, then use variables to store your parsed data. If the variables are populated, then don’t hit the server. If the variables have not been initialized, then hit the server, parse and put the data into the respective variables. As for holding the data for 5 minutes, use a datetime variable to check if the other variable data is stale.