Giter Site home page Giter Site logo

Comments (6)

sagikazarmark avatar sagikazarmark commented on June 7, 2024

Do you mean RequestConditional plugin and a RequestMatcher?

from httplugbundle.

Nyholm avatar Nyholm commented on June 7, 2024

Yes, I've never worked with the RequestConditional plugin. We should add support for that plugin.

from httplugbundle.

sagikazarmark avatar sagikazarmark commented on June 7, 2024

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?

from httplugbundle.

ostrolucky avatar ostrolucky commented on June 7, 2024

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.

from httplugbundle.

dbu avatar dbu commented on June 7, 2024

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.

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.

having such things configurable would seem like a good idea to me.

from httplugbundle.

ostrolucky avatar ostrolucky commented on June 7, 2024

Agreed, let's close then

from httplugbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.