iOS Cache-related information collection

Source: Internet
Author: User

Links: http://www.cnblogs.com/pengyingh/category/353093.html

Use Nsurlcache to get local data instead of remote UIWebView request summary: Original Matt Gallagher original link: http://cocoawithlove.com/2010/09/ substituting-local-data-for-remote.html Translation: http://disanji.net/2010/11/24/ Substituting-local-data-for-remote-html/cachedresponseforrequestcocoacocoawithloveiosmatt Gallaghernsurlcacheuiwebviewuiwebviewdelegate in the study of Apple's official demo:xmlperformance, read the full text of Nsur

Posted @ 2012-03-07 16:00 Pengyingh Read (1879) | Comments (0) Edit

Use caching on iOS to make programs run efficiently. Summary: The purpose of caching is to use applications that can respond more quickly to user input, which is a program that runs efficiently. Sometimes we need to cache the data obtained by the remote Web server and reduce multiple requests to the same URL. Memory cache We can use the Nsurlcache class in the SDK. Nsurlrequest needs a cache parameter to describe the URL it requested to cache the data, let's look at its cachepolicy type first. 1. Nsurlrequestuseprotocolcachepolicy nsurlrequest The default cache policy, using the Protocol protocol definition. 2, Nsurlrequestreloadignoringcachedata ignore the cache directly from the original address download. 3, NS read the full text

Posted @ 2012-03-07 08:52 Pengyingh Read (417) | Comments (0) Edit

A summary of the local caching mechanism design for iOS apps: Functional Requirements This caching mechanism satisfies the following features. 1. You can cache the data to a local disk. 2, you can determine whether a resource has been cached. If it has been cached, the same resource is requested, first to local disk search. 3, you can determine when the file cache expires. Here for the sake of simplicity here, we set an expiration time for each requested file when requesting a URL resource. 4, can be implemented: if the file has been cached, and has not expired, this will return the local data, or re-request the URL. 5, can be implemented: If the file download is unsuccessful or the download is not completed, the next time you open the program, remove the files that were unsuccessful or did not download. 6, can be achieved: simultaneously request or download multiple resources. Design implementation: 1, design a CacheItem class, used to request a Web connection, one instance of it represents a read the full text

Posted @ 2012-02-18 11:06 Pengyingh Read (1264) | Comments (1) Edit

How to save cookies in iphone summary: nsurlrequest*request =[nsurlrequest requestwithurl:[nsurl urlwithstring:@ "/http www.google.com/"]; Nsurlconnection*connection =[nsurlconnection connectionwithrequest:request delegate:self];-(void) connection: ( nsurlconnection*) connection Didreceiveresponse: (nsurlresponse*) response{Nshttpur Read the full text

Posted @ 2012-02-16 15:38 Pengyingh Read (79) | Comments (0) Edit

Nsurlcache Summary: NSURLCache1. Initialize several methods: The Sharedurlcache;setsharedurlcache;initwithmemorycapacitysharedurlcache method returns a Nsurlcache instance. By default, memory is 4m,4* 1024x768 * 1024;disk for 20M,20 * 1024 * 1024; path in (nshomedirectory)/library/caches/(current application name, [[ Nsprocessinfo ProcessInfo] processName]) Setsharedurlcache This method can be used to change the default read the full text

Posted @ 2012-02-08 21:02 Pengyingh Read (1917) | Comments (0) Edit

iOS development cache mechanism----Memory Caching mechanism Summary: Introduction: In iOS application development, in order to reduce the number of interactions with the server side, speed up the user's response speed, generally in the iOS device to add a caching mechanism. Here's how to cache in an iOS device. Purpose: The purpose of caching is to use applications that can respond more quickly to user input, which is a program that runs efficiently. Sometimes we need to cache the data obtained by the remote Web server and reduce multiple requests to the same URL. Interpretation: Memory Cache We can use the Nsurlcache class in the SDK. Nsurlrequest needs a cache parameter to describe the URL it requested to cache the data, let's look at its cachepolicy type first. 1, nsurlrequestuseprotocolcachepolicy nsurlrequest Default Read the full text

Posted @ 2012-02-08 18:57 Pengyingh Read (1715) | Comments (0) Edit

iOS Development Network Load picture cache policy ──asidownloadcache Cache policy Summary: In our actual project, many cases need to load pictures from the network, and then display the picture in the ImageView, but each time to request from the network, will seriously affect the user experience, In order not to need to download data from the Internet every time, want to put the picture into the local cache, so we need a good caching strategy, today I will be in the project engineering experience to share to everyone, I here mainly introduce the powerful ASIHTTPRequest cache strategy, and how to use: Here are the steps: First, set the cache policy in the Splitdemoappdelegate delegate agent, the following code is implemented: in the SplitDemoAppDelegate.h file, the code is as follows: 1 #import <uikit/uikit.h > 2 3 @ Read full text

Posted @ 2012-02-08 18:25 Pengyingh Read (10057) | Comments (0) Edit

iOS development Cache (ii): Design a local caching mechanism for a mobile app summary: reprinted from: http://blog.csdn.net/zhuqilin0/article/details/6653532 in mobile app development, In order to reduce the number of interactions with the server, and to speed up the response of users, generally in the iOS device to add a caching mechanism, the previous article describes the iOS device memory cache, this article will design a local cache mechanism. Functional requirements This caching mechanism satisfies the following features. 1. You can cache the data to a local disk. 2, you can determine whether a resource has been cached. If it has been cached, the same resource is requested, first to local disk search. 3, you can determine when the file cache expires. Here for the sake of simplicity here, we set an expiration time for each requested file when requesting a URL resource. 4, can realize: if ... Read the full text

Posted @ 2012-02-08 18:02 Pengyingh Read (1814) | Comments (0) Edit

iOS Development cache (i): Memory Cache Summary: The previous article describes how to upload and download files, and this article describes how to cache on iOS devices. This article will only cover caching content in memory, and the next article describes caching content on iOS disks. The purpose of caching is to use applications that can respond more quickly to user input, which is a program that runs efficiently. Sometimes we need to cache the data obtained by the remote Web server and reduce multiple requests to the same URL. Memory cache We can use the Nsurlcache class in the SDK. Nsurlrequest needs a cache parameter to describe the URL it requested to cache the data, let's look at its cachepolicy type first. 1, nsurlrequestuseprotocolcachepolicy nsurlrequest Default Read the full text

Posted @ 2012-02-08 17:49 Pengyingh Read (118) | Comments (0) Edit

iOS Cache-related information collection

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.