DACache is a simple cache manager that simplifies caching of data to the file system.
This simple cache manager will allow you to cache files in memory and on the file system at the same time. You use it as a dictionary, if you have files cached in memory it will use them, otherwise, it will try and fetch them from the disk. Using file caching is optional.
You can read more about this library on my blog: http://agostini.tech/2017/06/05/two-tier-caching-with-nscache/
var cache = DACache()
cache["key"] = dataObjectToCache // Store
let value: NSData? = cache["key"] // Fetch
DACache is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DACache'
Dejan Agostini, [email protected]
DACache is available under the MIT license. See the LICENSE file for more info.