Using cache on WidgetExtension

I am planning on using a cache with NSCache for the WidgetExtension, how would I guarantee that my NSCache lives as long as possible? I plan on initializing the cache when getTimeline is called, if I initialize it there would my NSCache still live for the next time for when the timeline is regenerated, even if the WidgetExtension is terminated?

Using cache on WidgetExtension
 
 
Q