Git Product home page Git Product logo

Comments (7)

lsmith77 avatar lsmith77 commented on June 16, 2024

good point .. think we need to explore if to delegate responsibility for this to the data loader.
at the same time .. in my current application we are handling this via our custom Controller.

from liipimaginebundle.

lsmith77 avatar lsmith77 commented on June 16, 2024

actually thinking about this some more .. when using file system caching it should be handled by the web server. when disabling caching i think the normal use case will be using a reverse proxy which again will automatically handle this.

so imho we should not handle this either.

as for cache headers this should be also be handled by the user .. either with a custom controller or via LiipCacheControlBundle.

from liipimaginebundle.

 avatar commented on June 16, 2024

actually thinking about this some more .. when using file system caching it should be handled by the web server.

Yes, but for the first request which hits the app we don't serve this header (we should).

when disabling caching i think the normal use case will be using a reverse proxy which again will automatically handle this.

I am not sure. Why the reverse proxy will handle it differently if original response doesn't contain this header?

from liipimaginebundle.

 avatar commented on June 16, 2024

Please reconsider this PR.

from liipimaginebundle.

lsmith77 avatar lsmith77 commented on June 16, 2024

@MHeleniak: my point is more i guess .. its close to impossible to really properly handle this generically. cache validation is simply too application specific. the right solution is for users to extend the Controller and/or use LiipCacheControlBundle to set cache headers.

now one thing that we could think about is how the data loader could return such metadata back to the Controller ..

from liipimaginebundle.

LouTerrailloune avatar LouTerrailloune commented on June 16, 2024

Adding an option (or using a custom cache path resolver) to redirect after creation of the image cache would resolve this. First time we just generate image and redirect 301, next time the webserver returns the file directly.
I think a redirection if more than doanloading the content twice.

from liipimaginebundle.

lsmith77 avatar lsmith77 commented on June 16, 2024

i have refactored the entire response creation quite a bit. so it should enable people to do whatever they need.

from liipimaginebundle.

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.