-
-
Notifications
You must be signed in to change notification settings - Fork 878
PFFile Directories Need Clean Up #18
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
Comments
Can we get a small repro case? |
What I think should happen is:
|
Agreed on clearing the staging directory upon parse initialization. Not so sure a public API for clearing the cache is useful, but we can add it. |
+1 for automatically trimming the staging directory. it would be nice to have that done in background to avoid blocking app launch. |
…nously) upon initialization of Parse. Fixes half of #18.
Hey guys, a quick update... we are tracking this for version 1.8.2 and will get there very soon. Our current plan is to implement automatic nuking for In regards to File Cache under |
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
Previously, our file staging code was not centralized, wasn't very efficient, and most importantly made testing & migration difficult. Fixes half of #18.
My app-in-development had 2.4GB of data in PFFileStaging which led me here. I just updated the app with 1.8.2 Parse SDK version, cleaned build and relaunched the app. I was expecting this directory to be wiped clean but unfortunately nothing happened. Are there any specific steps to take or is this process fully transparent to the developer? |
The first usage of PFFile APIs - will clear the directory for you, since it's lazily loaded. |
Awesome! Worked like a charm, thank you! |
Please reopen this issue: Additionally, I have n=20 of PFFileCache NOT being deleted by the system when low on disk space. This where low = < 200MB of space. Bottom line, I think we / Parse needs to assume the worst and manage these directories accordingly. Our application runs for months on end and can build up GBs of data in the current incarnation. As an aside, I wonder if part of the reason we have trouble is bad network. Would files be left around if the uploading failed? |
There was a slight change - The only thing that comes to my mind as a workaround for now - you can safely delete the cache yourself by using something like this on every app launch before you interact with file APIs on Parse. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *folderPath = [paths.firstObject stringByAppendingPathComponent:@"Parse"];
[[NSFileManager defaultManager] removeItemAtPath:folderPath error:nil]; |
@MobileVet, I've also just realized that taking into account that you have an app running for months non-stop - the system indeed doesn't get a chance to remove this cache. Keep an eye open on #488, and if you have an idea for an API that would work across platforms - that would be amazing. |
@nlutsenko thanks for the note. Actually, I misspoke a bit. The app should be able to run for months but we shut it down each night from 3am - 8am. Despite this, we aren't seeing these caches get cleared. I am not sure if it related but we shut the app down programmatically with an exit(0). |
The label |
Users of my app have complained about it taking up too much space on disk. Inspecting the app bundle reveals two large directories maintained by Parse.
I find it odd that Parse is not cleaning those up. I also don't understand why it is loading files in PFFileStaging at all since I'm using a regular networking library to load the files from URL.
I've observed these issues on V1.7.4 but I have no reason yet to believe they've been fixed in later releases. Any thoughts?
The text was updated successfully, but these errors were encountered: