ID's need to be truly unique in ULV.
It's what I said: an ID is an UNIQUE identifier. So TextID <> ImgID <> ItemID. In some cases, ItemID can be = to ImgID or = to TextID, and I agree that is convenient, but you can never have all three equals. My own practice is to start the ID of text data with "txt" and the ID of images with "img" so there's no confusion between the two types. Then I add the hash value of the path to the resource file and I end with the file name. That gives something like: "img45665454688989logojpg". When the resources come from a database, I simply use the ID of the record, e.g. "txt152". You could do differently.
It doesn't matter if you use only one folder for your cache or many. Since all IDs are supposed to be unique, all resources can be stored in the same folder (their filename is "
their_ID.0"). BUT if you use a record ID as in the example above, then there's a chance to have the same ID for records from different tables, so you have to create in this case a subfolder for each ULV using a different set of tables. My own practice is to have the same folder when the ULV share the same data, and separate folders in the other cases.
I will rewrite the documentation for the next version. I will insist on the IDs because my examples are not the best place to explain them.
When (what situation) should I use
1) CloseCache and ReopenDiskCache?
2) StopAsyncLoading?
3) ClearMemoryCache
1) CloseCache: whenever the ULV is no longer used (when you exit the activity for example)
ReopenDiskCache: whenever the cache is closed and you need to reopen it for an already initialized ULV (you may close the cache while in Pause and reopen it when the app resumes)
The cache uses a journal to know the state of writings and the last access to each resource. It uses also buffers for its writings. So to ensure that all writings are flushed to the disk and that the journal is properly closed, it is recommended to call CloseCache when you no longer need the cache.
2) This is automatically called when the app is paused because you cannot load a resource or update an item while in pause. So call this function in the other cases, when you want to cancel the async loadings in progress.
3) This is automatically called by ClearContent to free all resources in the memory cache. Use it if you're short on memory and want to clear the cache.