PINCache

PINCache is a thread-safe key-value cache framework for storing temporary objects that are difficult to obtain or reconstruct, such as downloading data or processing slow results. It integrates memory cache (PINMemoryCache) and hard disk cache (PINDiskCache).

The main function of PINCache is to provide an easy-to-use cache front-end, and small and fast memory cache files are asynchronously saved to the hard disk cache. When some events that affect the program memory occur, such as the program switches to the background and the memory is insufficient, PINCache will automatically write the memory cache to the hard disk cache. During the synchronization process, it will also automatically create dispatch groups so that the operation will not be blocked (blocking).

Asynchronous Methods

– objectForKey:block:

– setObject:forKey:block:

– removeObjectForKey:block:

– trimToDate:block:

– removeAllObjects:

Synchronous Methods

– objectForKey:

– setObject:forKey:

– removeObjectForKey:

– trimToDate:

– removeAllObjects



Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327076088&siteId=291194637