Skip to content
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

Change the default cache path #67

Open
rastersize opened this issue Apr 15, 2016 · 2 comments
Open

Change the default cache path #67

rastersize opened this issue Apr 15, 2016 · 2 comments
Milestone

Comments

@rastersize
Copy link
Contributor

We should change the default cache location the next time we release a breaking update. I think the earliest we can do that is with version 2.0 (which is a far ways off, not even planned).

Currently the path used is the temporary directory appended with a path component that is very specific.

[NSTemporaryDirectory() stringByAppendingPathComponent:@"/com.spotify.temppersistent.image.cache"];

(SPTPersistentCacheOptions.m#L51)

It would be better to set it to a more generically named path, such as:

[NSTemporaryDirectory() stringByAppendingPathComponent:@"/com.spotify.persistentcache.default"];
@rastersize rastersize added this to the v2.0 milestone Apr 15, 2016
@8W9aG
Copy link
Contributor

8W9aG commented Apr 21, 2016

I'm a little worried that people will miss this when they upgrade, I wonder if there is a way to migrate the temporary paths of the cache?

@rastersize
Copy link
Contributor Author

@8W9aG we could probably include a migrator, yeah. I guess we could try to move the old directory to the new name. Making sure we don’t overwrite anything though.

If it fails we could write a small .we-tried-to-migrate-but-if-failed-so-let-us-not-try-again file in the old directory. So we don’t get stuck in some bad loop where we try to migrate every time the app launches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants