Skip to content

Latest commit

 

History

History

ResourceCache

Concurrent and thread safe resource cache with Swift Concurrency

This project contains a simple app with some examples of possible ways to build a concurrent and thread safe resource cache (caching of remotely fetched resources).

Profile the example app with the Instruments tool using the Swift Concurrency profiling template, and see how the different resource cache implementations behave in terms of Task creation etc.

The code is heavily inspired by these WWDC videos (which I really recommend watching!):

This project also contain some example utility classes for safely managing protected values across Threads / concurrency contexts:

Some Unit Tests are included to help show the differences between the different implementations of a resource cache, but due to the nature of concurrency they are most reliable when ran individually.