Latest 0.1.0
Homepage https://github.com/rallahaseh/RACaching
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

The purpose of the library is to abstract the downloading (images, pdf, zip, etc) and caching of remote resources (images, JSON, XML, etc) in-memory.

RACaching

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

Import the framework

import RACaching

Extend RAURLObserverProtocol to the class and define a RAResourceManager, which loads all the resources you need from http/https.

Resource Manager:

  • Checks where corresponding resource for a URL in cache using cacheManager, if the resource is not found it checks if already downloading by the downloadsManager.
  • If the resource is not found then it creats resource and initialises download for that resource with adding observers for that resource.
  • If the resource is found in cache it sends the data back to the observer.
  • If the resource is found in the downloadsManager then it adds the observer to the list of resource observer.

Then use

open func getDataFor(_ urlString:, withIdentifier identifier:, withUrlObserver observer:)

Where it checks if the resource of the URL exists or not to creates new resource if not, the identifier here to add observers to a resource and delete it if object does not need data and the observer communicate the status of data fetch from Cache or Server

Installation

RALocalization is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'RALocalization'

Author

rallahaseh, [email protected]

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

RACaching is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'RACaching'

Author

rallahaseh, [email protected]

License

RACaching is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RACaching",
    "version": "0.1.0",
    "summary": "RACaching is a library for cache remote resources (images, JSON, XML, etc) in-memory",
    "description": "The purpose of the library is to abstract the downloading (images, pdf, zip, etc) and caching of remote resources (images, JSON, XML, etc) in-memory.",
    "homepage": "https://github.com/rallahaseh/RACaching",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "rallahaseh": "[email protected]"
    },
    "source": {
        "git": "https://github.com/rallahaseh/RACaching.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/rallahaseh",
    "platforms": {
        "ios": "8.0"
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "source_files": "RACaching/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This