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

Added a cache clearer for generated images #48

Closed
wants to merge 1 commit into from

Conversation

web-dev
Copy link

@web-dev web-dev commented Jan 31, 2012

Added a cache clearer service that uses the new SF 2.1 cache clearer service tag. This fixes #43

{
$cachePath = $this->cacheManager->getWebRoot().DIRECTORY_SEPARATOR.$this->cachePrefix;

$this->filesystem->remove(Finder::create()->in($cachePath)->depth(0)->directories());
Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Author

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.

@lsmith77
Copy link
Contributor

lsmith77 commented Feb 7, 2012

ping?

@web-dev
Copy link
Author

web-dev commented Feb 13, 2012

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.

@lsmith77
Copy link
Contributor

ping again :)

@web-dev
Copy link
Author

web-dev commented Apr 11, 2012

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.

@lsmith77
Copy link
Contributor

great

sixty-nine pushed a commit that referenced this pull request Jun 13, 2012
Original code from @web-dev in pull request #48.
Adapted with Lukas comments.
@sixty-nine
Copy link

Without news since a long time we decided to adapt your code to fit the pull request remarks, and created a new PR.

#80

@sixty-nine sixty-nine closed this Jun 13, 2012
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.

implement a cache cleaner
5 participants