-
Notifications
You must be signed in to change notification settings - Fork 379
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 cache clearing & setting cachePrefix for Aws S3 #336
Conversation
looks good to me |
// TODO: implement cache clearing for Amazon S3 service | ||
// Let's just avoid to clear the whole bucket if cache prefix is empty | ||
if ($cachePrefix === '') | ||
throw new \InvalidArgumentException("Cannot clear the Imagine cache because the cache_prefix is empty in your config."); |
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.
please do nothing here, as exception is a BC break.
FYI: in 1.0 this method was removed.
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.
You mean replacing the Exception with a simple return, like in the new commit?
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.
yes, could add {}
for if statement as it require PSR
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.
Done
Added cache clearing & setting cachePrefix for Aws S3
thanks |
Hello, am I missing something or this improvement was overwritten in ( 8cd9e06 )? It's not, for sure, in the last dev-master version of the repository. |
Not sure if this is the best solution, but I used a setter to get the cachePrefix to fix #269 & #251.
This would require adding the prefix to the resolver like;
Anyway, it clears all files inside the predefined directory in your bucket when running the
app/console cache:clear
command.