Skip to content

greenchiu/GXCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GXCache

A lightweight cache component.

Build Status Support  Support  codecov.io

GXCache is a lightweight cache component. It releases the data cache in memonry when your App receives memory warning, and lazy-loading when you access your value next time.

Features

  • Thread-safe.
  • Support Objective-C NSCoding and NSCopying.
  • Support Swift.

How GXCache works

GXCache will clean the cache folder when you first time cache data for each process. Write data into disk when set data into cache and observer UIApplicationDidReceiveMemonryWarningNotification to release data in memory. Lazy-loading will work if there occurred memory warning.

How to use

You can find sample with the testcase GXCacheTests.m

Installation

Add files GXCache .h and .m into your project manually, they are under folder sources.

License

Use this component in your apps? Let me know!

Copyright (c) 2018 ChihChiang-Chiu (Green), https://medium.com/@greenchiu1986 Licensed under the MIT license.