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

ImageCache - custom cache path #157

Merged
merged 2 commits into from Nov 17, 2015
Merged

ImageCache - custom cache path #157

merged 2 commits into from Nov 17, 2015

Conversation

samvanderhyden
Copy link
Contributor

Added an optional path parameter to init. This is really useful for me as I want a cache in documents dir for user generated photos, and also to make the ImageCache backwards compatible from an existing cache.

Sam Vanderhyden added 2 commits November 16, 2015 10:09
- Added custom cache path to ImageCache init (if you need a custom image cache location)
- Made diskCachePath public so a user can see where the images are being stored on disk
- Made cachePathForKey and cacheFileNameForKey public so an image cache could be constructed easily from existing files
let cache = ImageCache(name:"test",path:customPath)
XCTAssert(cache.diskCachePath == customPath,"Custom disk cache path set correctly")
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Line #59 should have no trailing whitespace

@onevcat
Copy link
Owner

onevcat commented Nov 17, 2015

Great! Thanks a lot for contributing.

@onevcat onevcat merged commit 4dea974 into onevcat:master Nov 17, 2015
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

Successfully merging this pull request may close these issues.

3 participants