Awesome Easy To Use Key/Value Store With Automatic Disk And Memory Caching

I’ve mentioned a number of caching projects that feature easy caching one of the most popular being SDWebImage which provides easy image downloading with built-in caching.

Here’s an excellent new open source project from Tumblr called TMCache. TMCache provides a key/value store that works with any with built-in memory and disk caching.

As the readme states:

TMCache is a key/value store designed for persisting temporary objects that are expensive to reproduce, such as downloaded data or the results of slow processing.

It is comprised of two self-similar stores, one in memory (TMMemoryCache) and one on disk (TMDiskCache), all backed by GCD and safe to access from multiple threads simultaneously.

On iOS, TMMemoryCache will clear itself when the app receives a memory warning or goes into the background.

Objects stored in TMDiskCache remain until you trim the cache yourself, either manually or by setting a byte or age limit.

You can find TMCache on Github here.

A very cool project, and probably the most useful all around open source caching library I’ve seen.

Original article: Awesome Easy To Use Key/Value Store With Automatic Disk And Memory Caching

©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *