Skip to content

cetorres/caciracache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cacira Cache

Cache library in Swift for iOS using NSUserDefaults.

Installation

Just drag and drop the two .swift files into your project.

Usage

// Save to cache
let obj1 = CACacheObject(content: JSON)
CACache.setObject(obj1, forKey: "myObject")

// Retrieve from cache
let obj2 = CACache.getObject(fromKey: "myObject")

// Retrieve from cache with a max cache age (NSTimeInterval)
let obj2 = CACache.getObject(fromKey: "myObject", withMaxCacheAge: 2*60*60) // 2h

Contributing

  • Create something great, make the code better, add some functionality, whatever (this is the hardest part).
  • Fork it
  • Create new branch to make your changes
  • Commit all your changes to your branch
  • Submit a pull request

Contact

Feel free to get in touch.

About

Cache library in Swift for iOS using NSUserDefaults.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages