New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YYKVStorage] initWithPath should return error when directory already exists #10
Comments
When something is stored in the file directory and you may re-open it at the next time, so it should not return error. |
Yet if we use
|
I didn't really notice those comments until now...I think it would better to error out or something like that. |
Yeah..maybe I should give an error.. |
I was also experiencing errors related to a locked database. Can we reuse names/paths in order to reuse a YYCache that was created on a previous run? At the moment I am doing:
What's the recommend way of creating/reusing and old YYCache or is this not possible? Could you clarify what you mean by "When something is stored in the file directory and you may re-open it at the next time, so it should not return error." This seems to conflict with |
Currently, I recommend to create only one YYCache/YYDiskCache instance for a specified path in your app (singleton). I will do some improvements to avoid this issues. |
Updated: If the disk cache instance for the specified path already exists in memory, the initialize method will return it directly, instead of creating a new instance. |
The file creation part from YYKVStorage.m:
This will not result in an error if directory already exists.
The text was updated successfully, but these errors were encountered: