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

Cache when using streams #13

Closed
kevva opened this issue Jan 15, 2014 · 5 comments
Closed

Cache when using streams #13

kevva opened this issue Jan 15, 2014 · 5 comments

Comments

@kevva
Copy link
Member

kevva commented Jan 15, 2014

When using streams we have no information about the src or dest file and therefore can't check whether the optimized file exists in cache or not using https://github.com/kevva/cache-file.

https://npmjs.org/search?q=cache+stream

@sindresorhus
Copy link
Contributor

We do have the source and dest buffer though. So could compare that. I'm just not sure caching should be a part of image-min.

@kevva
Copy link
Member Author

kevva commented Jan 15, 2014

Yeah, but how do we know where to look? And we'd still have to optimize the image before comparing it to the dest buffer which kinda makes the caching redundant.

@sindresorhus
Copy link
Contributor

@kevva disk, sad lol... i really wish ramdisks were a standard OS feature, would make this so much easier.

@kevva
Copy link
Member Author

kevva commented Jan 16, 2014

Closing this as caching probably should be done somewhere else, preferably in grunt-contrib-imagemin or gulp-imagemin.

@kevva kevva closed this as completed Jan 16, 2014
@sindresorhus sindresorhus reopened this Jan 16, 2014
@sindresorhus
Copy link
Contributor

I agree, but keeping it open here so I don't forget. We should also have an example on how to cache in the readme when we figure it out.

shinnn added a commit to imagemin/imagemin-svgo that referenced this issue Nov 13, 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

No branches or pull requests

2 participants