I am trying to implement caching in my RSS feed application. The application has many default RSS feeds implemented, and I want it to cache the data it downloads from each server and associate with the URL related, so that the next time the user wants to view that feed again, he will not have to download the file.
The question is... how do I do that in a most efficient way?
I initially thought of writing the complete raw NSData chinks I download from a server to the iPhone's disk, and then load it again when necessary, but how can I associate each cache file with a URL so that I can search if the URL the user sees at runtime is cached? I'm looking for ideas, and directions to that, rather than plain code.
Thank you in advance.
The question is... how do I do that in a most efficient way?
I initially thought of writing the complete raw NSData chinks I download from a server to the iPhone's disk, and then load it again when necessary, but how can I associate each cache file with a URL so that I can search if the URL the user sees at runtime is cached? I'm looking for ideas, and directions to that, rather than plain code.
Thank you in advance.