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
Support configuration for UrlMatcher #126
Comments
Do you mean RequestConditional plugin and a RequestMatcher? |
Yes, I've never worked with the RequestConditional plugin. We should add support for that plugin. |
Hm, yes, it sounds like a good idea. Although we have a RequestMatcher interface, I guess most of the times we want to use the default implementation, so I suggest the following plugin configuration: request_condition:
# optional if something from bellow is provided
matcher: matcher.service
# these are optional if the matcher service is provided
# and creates an instance of the default implementation
path: null
host: null
methods: []
schemes: [] I don't recall how we solved multiple instance of the same plugin: by naming or passing an array to the plugin config? |
As far as I understand, what is asked for here is ability to configure CachePlugin with RequestMatcher. For this to implement, https://github.com/php-http/cache-plugin should be first changed to support this. I don't see any other use case for this conditional feature. But currently very few things in CachePlugin are configurable via DSL. For example, in my experience respect_response_cache_directives, default_ttl and cache_lifetime have to be changed often and there is no way to change it in config itself. |
given the age of this issue, it seems to me like there is not much need for this. not strictly against it, but having too much flexibility also has a cost for the users.
having such things configurable would seem like a good idea to me. |
Agreed, let's close then |
.. or we should at least document how you use the UrlMatcher with the bundle. I want to write something here: http://php-translation.readthedocs.io/en/latest/guides/configure-httplug.html#configure-caching
All request to Google API should be cached but no others.
The text was updated successfully, but these errors were encountered: