I'm writing an NSObject
subclass similar to that of NSCache
, which enables file caching to the disk on an iOS Device.
I am in the process of writing the queues for (i) reading (ii) writing, but I wanted to make sure that the type of queue I will be creating is right, and won't therefore cause problems with files becoming corrupt in the future.
For the read queue, I was planning on creating a concurrent queue as many files can be read at the same time without any issue.
For the write queue, however, I was planning on creating a serial queue to prevent more than one file being written to at once.
Can you tell me if this is the correct approach?