:package: Nothing but Cache.
🚀 Merged pull requests
🤘 Closed issues
Swift 4
with Codable
support 🎉⚠️ Changes from v3 -> v4 ⚠️
Storage
most of the time.HybridCache
was removed. Storage
can be configured with DiskConfig
and MemoryConfig
. If you don't specify MemoryConfig
, then only disk cache is used.SpecializedCache
was removed. You can just use Storage
Cacheable
and Coding
was removed. You need to conform to Swift 4 Codable
to take advantage of the auto serializing/deserializingCacheArray
can be replaced with [SomeClass].self
Logger.isEnabled
to true
#110Clear cache keeping root directory https://github.com/hyperoslo/Cache/pull/106
Cache array of Cachable
objects https://github.com/hyperoslo/Cache/pull/104
⚠️ Breaking change!!!
Cache 3 features multiple public API changes and brand new features implemented as a feedback to the input we got. We also did some internal framework refactoring that will make it easier to read the code, test and contribute 🎉
Cache
is renamed to SpecializedCache
in order to resolve conflicts with the name of the framework.SyncCache
and SyncHybridCache
wrappers were removed because SpecializedCache
and HybridCache
are now sync by default. But it's also possible to perform async cache operation using the new Async API: https://github.com/hyperoslo/Cache#hybrid-cache
subscript
to easily set/get/remove objects: https://github.com/hyperoslo/Cache#specialized-cache
setDiskCacheDirectoryAttributes
method and use setFileProtection
method to enable data protection: https://github.com/hyperoslo/Cache#enabling-data-protection
Coding
protocol which works in the same way as NSCoding
, but can be used for
Swift structs and enums: https://github.com/hyperoslo/Cache#coding
totalDiskSize()
method is added to get total cache size on the disk https://github.com/hyperoslo/Cache/pull/94