-
Notifications
You must be signed in to change notification settings - Fork 380
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
Added a cache clearer for generated images #48
Conversation
{ | ||
$cachePath = $this->cacheManager->getWebRoot().DIRECTORY_SEPARATOR.$this->cachePrefix; | ||
|
||
$this->filesystem->remove(Finder::create()->in($cachePath)->depth(0)->directories()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be handled inside the resolvers. aka we should add a method to the ResolverInterface to handle the deleting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually the clearer should iterate over all registered cache resolver and call a clear()
method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lsmith77 I completely agree, I will implement that approach into the WebPathResolver
.
ping? |
I haven't gotten around to rewriting the cache clearer into the web path resolver. I solved my problem inside another bundle so I'm going to come back to this when I get time. |
ping again :) |
I'll try to get back to this soon, I'm working on another project that uses this bundle so I should have a good place to test it. |
great |
Without news since a long time we decided to adapt your code to fit the pull request remarks, and created a new PR. |
Added a cache clearer service that uses the new SF 2.1 cache clearer service tag. This fixes #43