What about the AFCache API? Why do I would use it?
The AFCache API has some convenience methods that care about receiving data, parsing headers, storing data, error handling, etc. See CacheableItemDemoController.m for basic usage.
I guess I'm confused as to what AFCache actually does.
Basically it stores NSURLResponses on disk and serves them from there on subsequent requests. AFCache checks for freshness of the file. If the cached file on disk is outdated, AFCache transparently updates it and gives you the new version. I wrote AFCache because on iPhone, NSURLCache doesn't write to disk. In the last months AFCache has evolved to something like a cache package management tool. You may package a bunch of files on the server (via the afcpkg commandline tool), request this package from your client and prefill the cache instead of doing many requests for small files. One uses case would be a digital magazine issue downloaded into the cache (e.g. for offline reading).
GitHub
The AFCache API has some convenience methods that care about receiving data, parsing headers, storing data, error handling, etc. See CacheableItemDemoController.m for basic usage.
I guess I'm confused as to what AFCache actually does.
Basically it stores NSURLResponses on disk and serves them from there on subsequent requests. AFCache checks for freshness of the file. If the cached file on disk is outdated, AFCache transparently updates it and gives you the new version. I wrote AFCache because on iPhone, NSURLCache doesn't write to disk. In the last months AFCache has evolved to something like a cache package management tool. You may package a bunch of files on the server (via the afcpkg commandline tool), request this package from your client and prefill the cache instead of doing many requests for small files. One uses case would be a digital magazine issue downloaded into the cache (e.g. for offline reading).
GitHub
Comments
Post a Comment