Skip to content

Commit

Permalink
update readme for 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
aschuch committed Sep 18, 2016
1 parent ddf373d commit 08bef20
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Awesome Cache 3
# Awesome Cache

[![Build Status](https://travis-ci.org/aschuch/AwesomeCache.svg)](https://travis-ci.org/aschuch/AwesomeCache)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/AwesomeCache.svg)](https://img.shields.io/cocoapods/v/AwesomeCache.svg)
![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)
![Swift 2.2](https://img.shields.io/badge/Swift-2.2-orange.svg)
![Swift 2.3](https://img.shields.io/badge/Swift-2.3-orange.svg)
![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20watchOS%20%7C%20tvOS-lightgrey.svg)

Delightful on-disk cache (written in Swift).
Expand All @@ -26,7 +26,7 @@ do {

### Sync by design

AwesomeCache 3 is designed to have a sync API, making it easy to reason about the actual contents of the cache. This decision has been made based on [feedback from the community](issues/33), to keep the API of AwesomeCache small and easy to use.
AwesomeCache >= 3.0 is designed to have a sync API, making it easy to reason about the actual contents of the cache. This decision has been made based on [feedback from the community](issues/33), to keep the API of AwesomeCache small and easy to use.

The internals of the cache use a concurrent dispatch queue, that syncs reads and writes for thread safety. In case a particular caching operation blocks your main thread for too long, consider offloading the read and write operations to a different thread.

Expand All @@ -49,9 +49,6 @@ cache.setObject("Alex", forKey: "name", expires: .Date(NSDate(timeIntervalSince1
If an object is accessed after its expiry date, it is automatically removed from the cache and deleted from disk.
However, you are responsible to delete expired objects regularly by calling `removeExpiredObjects` (e.g. on app launch).




### Awesome API Caching

API responses are usually cached for a specific period of time. AwesomeCache provides an easy method to cache a block of asynchronous tasks.
Expand All @@ -77,6 +74,17 @@ You may perform any tasks (e.g. network calls) within this block. Upon completio

The completion block is invoked as soon as the cacheBlock is finished and the object is cached.

## Version Compatibility

Current Swift compatibility breakdown:

| Swift Version | Framework Version |
| ------------- | ----------------- |
| 3.0 | master |
| 2.3 | 4.x |
| 2.2 | 3.x |

[all releases]: https://github.com/aschuch/AwesomeCache/releases

## Installation

Expand All @@ -85,7 +93,7 @@ The completion block is invoked as soon as the cacheBlock is finished and the ob
Add the following line to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile).

```
github "aschuch/AwesomeCache" ~> 3.0
github "aschuch/AwesomeCache"
```

Then run `carthage update`.
Expand Down

0 comments on commit 08bef20

Please sign in to comment.