-
Notifications
You must be signed in to change notification settings - Fork 378
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
Refactoring 1.0.0 #155
Comments
sounds like a good plan. I will tweet this ticket to get more feedback |
Upgrading the |
Moving to PSR-3 requires bumping the requirement to Sf 2.2 (or injecting a wrapper in 2.1 rather than the Sf logger) |
Don't know if I should create a separate issue: I noticed that when you set cache_prefix to an empty string, cache:clear will completely delete the contents of the web folder. So it would be useful to have a security check here to prevent people from losing data accidently. (I "solved" it by setting cache_clearer: false, but only the backup saved my life..) |
@mahono you should create a separate issue to report the bug IMO |
@mahono That's indeed an issue, to be fixed asap. |
@Maxwell2022 Yes, this would be a neet feature. I would like to post-pone it and not make it a requirement for the new release. @stof True, the dependency would change, which is fine by me. The wrapper should be part of the bundle. |
+1 in moving to sf 2.2 for 1.0 to have PSR-3 logging. version 0.9 works and people who don't update symfony probably also don't update this bundle... |
this definitely needs more love. to invalidate a phpcr-odm cached image, i ended up with this
the resolver is not guaranteed to return a string, it can also be a RedirectResponse. and then the remove expects the path but without the prefix of imagine and filter name that the resolver just added to the path. |
That's exactly what's the issue with Anyway this line |
@havvg Consider |
as far as i understood, that is the idea here.
|
I am planing to rework You can remove a cache of single filter if string is passed or a set of filters in case of array. This is how the <?php
/**
* @param string $path
* @param array|string $filters
*/
function remove($path, $filters); After thinking about WDYT? |
i think we should also have something that allows me to clear all configured filters of one image. actually thats even the standard case to me unless you happen to know what filters are used with your image - which is very hard unless you hardcode and then you forget that you started using a different filter with the same images and then you don't invalidate properly anymore. btw, having an event when images actually get deleted would be very cool, for example to integrate with varnish. |
it could be possible if get all currently configred filters names and pass them as second arguments. @dbu is it sounds ok to you? We can also introduce a method in CacheManager which takes filter names and do remove, just a helper method.
event system would be indeed a good addition. |
imho, one method could be enough, |
closing as all discussed features\refactorings etc were implemented in 1.0. reopen if you think I miss something. |
Hi there,
I would like to start working on refactoring some parts of this bundle.
Those parts may not be backwards compatible, therefore the major version will be increased according to http://semver.org.
First of all, I would like to remove the
targetPath
(see #132, #135) from the user land.This will make sure, the user always interacts with the bundle (e.g. on the CacheManager) using the same filename, currently called
path
. The current call toresolve
should not be done by the user himself.In additional I want to remove the dependency of
Request
within theResolverInterface
. It's not actually required (see AmazonS3Resolver). The request should be injected into those resolver, requiring it (e.g. by the CacheManager using a respective interface); see #142.Furthermore I would like to move forward to
Psr\Log\LoggerInterface
replacingSymfony\Component\HttpKernel\Log\LoggerInterface
.As there are
Resolver
that issue requests or have other meaningful workload there should be a caching mechanism for theResolverInterface::resolve
method (see #156).What do you think? What's missing?
The text was updated successfully, but these errors were encountered: