Code Monkey home page Code Monkey logo

Comments (6)

Kevinrob avatar Kevinrob commented on May 18, 2024

Hi, I see what you mean. But this will break the RFC.

[...] the cache MUST:
[...]
   o  use other header fields provided in the 304 (Not Modified)
      response to replace all instances of the corresponding header
      fields in the stored response.

http://tools.ietf.org/html/rfc7234#section-4.3.4

I understand, that a server can (by the way of a 304) replace one or more headers in the cached response. So, it's not "really useless" in general.

Maybe, we can do a different method in CacheStrategyInterface like update(RequestInterface $request, ResponseInterface $response). With that, you can extend the strategy and change the behavior of this method.

Is it a performance issue for you?

from guzzle-cache-middleware.

vicmosin avatar vicmosin commented on May 18, 2024

Yes, additional method will help as well.

from guzzle-cache-middleware.

vicmosin avatar vicmosin commented on May 18, 2024

In my case Etag = md5(content) so it is really meaningless to update the cache per each request.. Frontend is a WP site, so yes, it's a performance issue for me ))

from guzzle-cache-middleware.

Kevinrob avatar Kevinrob commented on May 18, 2024

Ok, I will try to look at this today or tomorrow. Thank for reporting this issue!

from guzzle-cache-middleware.

Kevinrob avatar Kevinrob commented on May 18, 2024

@vicmosin Can you check #52? Is it useful for you like that?

from guzzle-cache-middleware.

Kevinrob avatar Kevinrob commented on May 18, 2024

Fixed with v1.3.

from guzzle-cache-middleware.

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.