Skip to content
S

SPTPersistentCache

Everyone tries to implement a cache at some point in their iOS app’s lifecycle

by spotifyFree

#1590in Utilities
0In stores

Description

SPTPersistentCache is an iOS and macOS library from Spotify for caching NSData on disk with a time to live. It uses the file system to store…

Highlights

  • Disk cache for NSData with TTL values
  • LRU design with scheduled garbage collection
  • Cache header tracks access, age and corruption
  • Separate files so reads and writes do not block each other
  • Static library or CocoaPods install

Ratings & Reviews

No ratings yet

Be the first to rate SPTPersistentCache.

People also visit

C

Cleardisk

Free macOS menu bar app to visualize and clean developer caches

Developer Tools
Launch
Z

Zeitgeist

An iOS app for keeping an eye on your Vercel deployments

Utilities
Launch
D

Duply

Native Mac cleaner that shows every file before it deletes

Utilities
Launch
M

Macos Sysdata

See what is really inside macOS System Data and delete it item by item

Developer Tools
Launch
C

content-hash-cache-pattern

Cache expensive file processing results using SHA-256 content hashes

AI Skills
Get
C

core-data

Build, review, or improve Core Data persistence in apps

AI Skills
Get

SPTPersistentCache FAQ

What does SPTPersistentCache do?

It caches data on disk with a time to live and manages disk space with garbage collection.

Which platforms are supported?

iOS 8.0 and later, and OS X 10.10 and later.

How do I install it?

Include the Xcode project as a static library, or add it through CocoaPods.

How should I name keys?

The key becomes the file name, so the README suggests creating keys with your own hash function, such as SHA1.

Should I use one cache for everything?

No. The README recommends a separate cache for each type of data, with one instance per cache.

What are the best SPTPersistentCache alternatives?

Popular alternatives to SPTPersistentCache include Zeitgeist, Duply and Macspace Releases. See all SPTPersistentCache alternatives

Developer Stuff

Badges