Add CoreData support to CacheControl
Moved cache calls to the main thread