Persistent CoreData-based cache and utility functions