Coder Social home page Coder Social logo

How to remove listening port (5443) and protocol scheme (http/https) from the cache_key when it is not regular port while preserving the hostname? about cache-handler HOT 7 CLOSED

Zerorigin avatar Zerorigin commented on June 12, 2024
How to remove listening port (5443) and protocol scheme (http/https) from the cache_key when it is not regular port while preserving the hostname?

from cache-handler.

Comments (7)

Zerorigin avatar Zerorigin commented on June 12, 2024

My idea is to add disable_proto and disable_port to the cache_keys block and move ttl and stale into the cache_keys to configure them.

This simplifies cache configuration for different static file types while improving cache efficiency.

from cache-handler.

Zerorigin avatar Zerorigin commented on June 12, 2024

Additionally, the subcommand hide just hides the key value and does not remove the headers (Age and Cache-Status), which is slightly different than expected, and should perhaps be broken down into hide key, hide header, and hide off, which would make it easier for users who want to remove the headers.

from cache-handler.

darkweak avatar darkweak commented on June 12, 2024

Hello @Zerorigin, I can add more directive to enable/disable the key. Btw I could add a TTL and stale directive to the cache_key block to be able to override the values. What do you think?

from cache-handler.

Zerorigin avatar Zerorigin commented on June 12, 2024

Hello @Zerorigin, I can add more directive to enable/disable the key. Btw I could add a TTL and stale directive to the cache_key block to be able to override the values. What do you think?

This is great, just what I need.

from cache-handler.

darkweak avatar darkweak commented on June 12, 2024

@Zerorigin in the next release you'll be able to create your own key template. e.g.

key {
    template "{host}-something-constant-{method} other {query}"
}

from cache-handler.

darkweak avatar darkweak commented on June 12, 2024

And I still have to implement the TTL and stale directly in the cache_keys.

from cache-handler.

Zerorigin avatar Zerorigin commented on June 12, 2024

@Zerorigin in the next release you'll be able to create your own key template. e.g.

key {
    template "{host}-something-constant-{method} other {query}"
}

The rest isn't urgent. 😄
Thanks for your hard work. ❤️

from cache-handler.

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.