{"id":2267,"date":"2016-11-18T16:19:18","date_gmt":"2016-11-18T10:49:18","guid":{"rendered":"https:\/\/www.innovationm.com\/blog\/?p=2267"},"modified":"2023-01-20T18:55:58","modified_gmt":"2023-01-20T13:25:58","slug":"cache-application-data-in-ios","status":"publish","type":"post","link":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/","title":{"rendered":"Application Data Caching in iOS"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Cache is a prominent term which you\u2019ve heard very often in Computing world. Alike, we have cache memory in our iPhones. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">As per the <\/span><i><span style=\"font-weight: 400;\">Wikipedia<\/span><\/i><span style=\"font-weight: 400;\">, description of cache is <\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">\u201cCache Memory <\/span><\/i><i><span style=\"font-weight: 400;\">is a fast and relatively small memory that is completely handled by the hardware, that stores the most recently used \u00a0<\/span><\/i><a href=\"https:\/\/en.wikipedia.org\/wiki\/Main_memory\"><i><span style=\"font-weight: 400;\">main memory<\/span><\/i><\/a><i><span style=\"font-weight: 400;\"> (RAM). The function of the cache memory is to speed up the RAM data access (performance increasing).<\/span><\/i><span style=\"font-weight: 400;\">\u201d<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Every Smartphone OS like Android or iOS allow developer to cache their data in Cache Memory. Internally, cache Memory is handled by OS itself and they can clear app-cache when OS is in shortage of cache memory. So, it\u2019s quite unreliable to store data in cache memory but you can use it to store data for a particular active session. <\/span><\/p>\n<p><b>Assumption<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Say, i have three View Controllers (A, B and C) and i have typed some name in A View controller. Then, I navigate to Viewcontroller-B and them moved to C. In C View Controller, I need what you have typed in \u00a0View Controller-A. In such cases, you should maintain a global property which you can access from any screen. That particular file is CacheManager which will handle all the global property which store the instance or value.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">So it would be like:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When I was typing name in text field of View Controller-A then, at that point of time I will store the inputted name in a Global Property (i.e Cache) which you can access it from View Controller-C. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Basically, In Step (1) we are saving the \u2018<\/span><i><span style=\"font-weight: 400;\">name\u2019 <\/span><\/i><span style=\"font-weight: 400;\">text field value and then, in Step (2) we are trying to retrieve data what we\u2019ve cached. Cache Data retains their data till application\u2019s active session. It will loose it\u2019s state when you kill your app. So, every time when you launch your app you\u2018ll have new cache. <\/span><\/p>\n<p><b>Customize Your Cache Manager<\/b><\/p>\n<p><span style=\"font-weight: 400;\">You are going to maintain a <\/span><i><span style=\"font-weight: 400;\">CacheManager<\/span><\/i><span style=\"font-weight: 400;\"> file in your project which is a singleton class with list of properties.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For instance, I want to cache my <\/span><i><span style=\"font-weight: 400;\">name<\/span><\/i><span style=\"font-weight: 400;\"> then, I\u2019ll declare a property with String-Optional type.<\/span><\/p>\n<pre class=\"lang:default decode:true \">var userName:String?<\/pre>\n<p><span style=\"font-weight: 400;\">And, after every declaration make sure you put your property to nil in clear() method. As, we will use this method to clear cache when we want to de-initialise all the property.<\/span><\/p>\n<pre class=\"lang:default decode:true \">userName = nil<\/pre>\n<p><b>Demonstration<\/b><\/p>\n<p><span style=\"font-weight: 400;\">I assume you have enough skills to design a screen. So, there is a View Controller which list two Text Fields (which accepts Name and Account Number) along with three buttons (Add to Cache, Get From Cache and Clear Cache).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Last, we need a Label where you can show your cached data.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture2.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-medium wp-image-2272 aligncenter\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture2-169x300.png\" alt=\"picture2\" width=\"169\" height=\"300\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture2-169x300.png 169w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture2.png 422w\" sizes=\"(max-width: 169px) 100vw, 169px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Next, we will create outlets for text fields &amp; label and touch up connection for buttons. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Next, we will modify CacheManager as per our need. For time being, we want to cache employee name and employee number what user is passing. So, we will declare two Optional-String type properties.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Then Our Cache Manager would be like:<\/span><\/p>\n<pre class=\"lang:swift decode:true\">\/\/MARK:- Stored Property for  Username(String)\r\nvar employeeName:String?\r\n\r\n  \/\/MARK:- Stored Property for Account Number (String)\r\n  var employeeID:String?\r\n\r\n\/\/MARK:- Computed Property for User Age\r\n    \/\/Special Case : I want to restrict user to have their AGE to '18'. They can't allow you to have their age more than 18.\r\n    var employeeRating:Int?{\r\n        \r\n        didSet{\r\n            if employeeRating! &gt; 10{\r\n                employeeRating = 10\r\n            }\r\n        }\r\n        \r\n    }\r\n  \r\n \/\/MARK: Clear Cache\r\n    public func clear(){\r\n        \r\n        employeeName = nil\r\n        employeeID = nil\r\n        employeeRating = 0\r\n\r\n\r\n    }<\/pre>\n<p><b>1. Write Data to Cache<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Now, we are ready with our CacheManager and now we will store corresponding value when you click on button \u201cAdd to Cache\u201d.<\/span><\/p>\n<pre class=\"lang:default decode:true\">private func cacheData(employeeName:String, employeeID:String, employeeRating:String){\r\n    \r\n        \r\n        \/\/Employee Name\r\n        CacheManager.shared.employeeName = employeeName\r\n        \r\n        \/\/Employee ID\r\n        CacheManager.shared.employeeID = employeeID\r\n        \r\n        \/\/Rating\r\n        CacheManager.shared.employeeRating = Int(employeeRating) ?? 0<\/pre>\n<p><i><span style=\"font-weight: 400;\">CacheManager <\/span><\/i><span style=\"font-weight: 400;\">is a singleton class which force you to use only single instance of cachemanager object. Hence, we have a <\/span><i><span style=\"font-weight: 400;\">shared <\/span><\/i><span style=\"font-weight: 400;\">object which return you only instance of CacheManager across the app. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">That\u2019s the sole reason we are using <\/span><i><span style=\"font-weight: 400;\">CacheManager.shared<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">CacheData() is a private method which is called from buttonCacheData_Clicked(_:) along with the three parameters.<\/span><\/p>\n<pre class=\"lang:default decode:true\">self.cacheData(employeeName: self.textFieldEmployeeName.text!, employeeID: self.textFieldEmployeeId.text!, employeeRating: self.textFieldRatting.text!)<\/pre>\n<p><span style=\"font-weight: 400;\">Here, we are passing the text field\u2019s value to the cacheData() method which ultimately store data in cache object.<\/span><\/p>\n<p><b style=\"line-height: 1.71429; font-size: 1rem;\">2. Read Data From Cache<\/b><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"line-height: 1.71429; font-size: 1rem;\"><span style=\"font-weight: 400;\">Next, we will see how to retrieve data from Cache.<\/span><\/span><\/p>\n<p><span style=\"line-height: 1.71429; font-size: 1rem;\">Alike, every property getter we&#8217;ll call by its name. So, we will write something like this:<\/span><\/p>\n<pre class=\"lang:default decode:true \">let cacheEmployeeID = CacheManager.shared.employeeID ?? \"\"\r\nlet cacheEmpolyeeName = CacheManager.shared.employeeName ?? \"\"\r\nlet cacheEmployeeRating = CacheManager.shared.employeeRating ?? 0<\/pre>\n<p><b>Note <\/b><span style=\"font-weight: 400;\">: ?? operator checks if the corresponding value is nil then it will set the \u201cempty\u201d.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Since, properties are Optional type so we have to check whether it is returning nil value or not. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If it\u2019s a nil value then store \u201c \u201d else return its value. That\u2019s the sole reason to use \u201cnil-coalescing operator (??)\u201d.<\/span><\/p>\n<p><b style=\"line-height: 1.71429; font-size: 1rem;\">3. Clear Cache<\/b><\/p>\n<p><span style=\"font-weight: 400;\">What if, i want to clear all data what i have cache. Then, you just call a method i.e. clear()<\/span><\/p>\n<pre class=\"lang:default decode:true \">CacheManager.shared.clear()<\/pre>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture4.png\"><img decoding=\"async\" class=\"size-medium wp-image-2274 aligncenter\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture4-169x300.png\" alt=\"picture4\" width=\"169\" height=\"300\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture4-169x300.png 169w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture4.png 369w\" sizes=\"(max-width: 169px) 100vw, 169px\" \/><\/a><\/p>\n<p><b>Conclusion<\/b><\/p>\n<p><span style=\"font-weight: 400;\"><i><span style=\"font-weight: 400;\">CacheManager<\/span><\/i><span style=\"font-weight: 400;\"> allow you to store state of any object or any value which you want to use in further screen of your app. Caching is only feasible when you don&#8217;t to persist your data permanently. As, it will reset its value when app restart itself. It come up with the best practice to maintain a Cache when you storing state for a single active-session of App.<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cache is a prominent term which you\u2019ve heard very often in Computing world. Alike, we have cache memory in our iPhones. As per the Wikipedia, description of cache is \u201cCache Memory is a fast and relatively small memory that is completely handled by the hardware, that stores the most recently used \u00a0main memory (RAM). The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2271,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,71],"tags":[181,178],"class_list":["post-2267","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios","category-mobile","tag-ios-10","tag-swift-3-0"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Application Data Caching in iOS - InnovationM - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Application Data Caching in iOS - InnovationM - Blog\" \/>\n<meta property=\"og:description\" content=\"Cache is a prominent term which you\u2019ve heard very often in Computing world. Alike, we have cache memory in our iPhones. As per the Wikipedia, description of cache is \u201cCache Memory is a fast and relatively small memory that is completely handled by the hardware, that stores the most recently used \u00a0main memory (RAM). The [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/\" \/>\n<meta property=\"og:site_name\" content=\"InnovationM - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-18T10:49:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T13:25:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"775\" \/>\n\t<meta property=\"og:image:height\" content=\"614\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InnovationM Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InnovationM Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/\"},\"author\":{\"name\":\"InnovationM Admin\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"headline\":\"Application Data Caching in iOS\",\"datePublished\":\"2016-11-18T10:49:18+00:00\",\"dateModified\":\"2023-01-20T13:25:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/\"},\"wordCount\":783,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/Picture1.png\",\"keywords\":[\"iOS 10\",\"Swift 3.0\"],\"articleSection\":[\"iOS\",\"Mobile\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/\",\"name\":\"Application Data Caching in iOS - InnovationM - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/Picture1.png\",\"datePublished\":\"2016-11-18T10:49:18+00:00\",\"dateModified\":\"2023-01-20T13:25:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/Picture1.png\",\"contentUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/Picture1.png\",\"width\":775,\"height\":614},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/cache-application-data-in-ios\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Application Data Caching in iOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\",\"name\":\"InnovationM - Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\",\"name\":\"InnovationM Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"caption\":\"InnovationM Admin\"},\"sameAs\":[\"http:\\\/\\\/www.innovationm.com\\\/\"],\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/author\\\/innovationmadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Application Data Caching in iOS - InnovationM - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/","og_locale":"en_US","og_type":"article","og_title":"Application Data Caching in iOS - InnovationM - Blog","og_description":"Cache is a prominent term which you\u2019ve heard very often in Computing world. Alike, we have cache memory in our iPhones. As per the Wikipedia, description of cache is \u201cCache Memory is a fast and relatively small memory that is completely handled by the hardware, that stores the most recently used \u00a0main memory (RAM). The [&hellip;]","og_url":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/","og_site_name":"InnovationM - Blog","article_published_time":"2016-11-18T10:49:18+00:00","article_modified_time":"2023-01-20T13:25:58+00:00","og_image":[{"width":775,"height":614,"url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture1.png","type":"image\/png"}],"author":"InnovationM Admin","twitter_misc":{"Written by":"InnovationM Admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/#article","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/"},"author":{"name":"InnovationM Admin","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"headline":"Application Data Caching in iOS","datePublished":"2016-11-18T10:49:18+00:00","dateModified":"2023-01-20T13:25:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/"},"wordCount":783,"commentCount":0,"image":{"@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture1.png","keywords":["iOS 10","Swift 3.0"],"articleSection":["iOS","Mobile"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/","url":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/","name":"Application Data Caching in iOS - InnovationM - Blog","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/#primaryimage"},"image":{"@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture1.png","datePublished":"2016-11-18T10:49:18+00:00","dateModified":"2023-01-20T13:25:58+00:00","author":{"@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"breadcrumb":{"@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/#primaryimage","url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture1.png","contentUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/11\/Picture1.png","width":775,"height":614},{"@type":"BreadcrumbList","@id":"https:\/\/www.innovationm.com\/blog\/cache-application-data-in-ios\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.innovationm.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Application Data Caching in iOS"}]},{"@type":"WebSite","@id":"https:\/\/www.innovationm.com\/blog\/#website","url":"https:\/\/www.innovationm.com\/blog\/","name":"InnovationM - Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.innovationm.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed","name":"InnovationM Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","caption":"InnovationM Admin"},"sameAs":["http:\/\/www.innovationm.com\/"],"url":"https:\/\/www.innovationm.com\/blog\/author\/innovationmadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/2267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/comments?post=2267"}],"version-history":[{"count":0,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/2267\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media\/2271"}],"wp:attachment":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media?parent=2267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/categories?post=2267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/tags?post=2267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}