Latest 0.1.6
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit, MapKit, AVFoundation

[![CI Status]( Sartori/ImageCacher.svg?style=flat)]( Sartori/ImageCacher)


ImageCacher helps you to easily cache web images from a given URL using Core Data as persistent storage framework, GCD for background fetching and blocks for asynch operations.

ImageCacher strategy is straightforward: you ask for an image by specifying its URL, the singleton class then:

  • search the image into an internal memory structure as first attempt, it will call the handler immediatly before return with source = ICCacheSourceMemory
  • otherwise it will try to fetch the image in background form the caching database, it will call the handler in case of success at the end of the fetching operation (executed in background) with source = ICCacheSourceLocal
  • otherwise download the image from the URL, save it to the caching database and will call the handler with source = ICCacheSourceWeb
  • if URL is invalid or a fatal error occurs the handler il called with source = ICCacheSourceUnknown

The common usage pattern is the following:

    [[ICImageCacher shared] getImageWithURL:<myurl> withCompletionHandler^(UIImage *image ,tICCacheSource source) {
        switch (source) {
        case ICCacheSourceMemory:
            // image has been found into memory, this block is called WITHIN getImageWithURL execution

        case ICCacheSourceLocal:
            // image has been found into local caching database, this block is called later

        case ICCacheSourceWeb:
            // image has been downloaded for the first time, , this block is called later.
            // Next time this url will be fetched from memory or from local cache

        case ICCacheSourceUnknown:
            // image not found ad not downloaded (an error should has been encountered)




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

pod "ImageCacher"


Roberto Sartori, [email protected]


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

Latest podspec

    "name": "ImageCacher",
    "version": "0.1.6",
    "summary": "ImageCacher helps you to manage image caching.",
    "description": "                        The image caching is asynchronous and based on blocks and GCD. The persistent storage is based on CoreData, fetches are executed in background, last accessed images are stored into a memory buffer.n",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Roberto Sartori": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.6"
    "platforms": {
        "ios": "7.0"
    "requires_arc": true,
    "source_files": "Pod/Classes",
    "resource_bundles": {
        "ImageCacher": [
    "public_header_files": "Pod/Classes/**/*.h",
    "frameworks": [

Pin It on Pinterest

Share This