Comments (5)
You should send a pull request instead of linking to the commit. It would make it easier to provide feedback and then to merge it
from liipimaginebundle.
i am not sure if we really want to add this or at least not like this.
we can add a method into the data loader interface to get metadata on the resource.
the actual handling of setting cache headers should be done else where though imho. either inside a customized controller or via LiipCacheControlBundle.
see also #16
cc @MHeleniak
from liipimaginebundle.
In my app I have handled this via another application dedicated for serving photos. Request to pic.example.com/filter_set/path/to/image.jpg
is translated to www.example.com/media/cache/filter_set/path/to/image.jpg
. In my case I have disabled caching in LiipImagineBundle
as this is hadled by app behind pic.example.com
.
Maybe it's not ideal (extra request) but it's much easier. @lsmith77 you mentioned in #12 that you done this the same way, right?
Btw. Don't send both ETag and Last-Modified headers. Only one of these is sufficent.
from liipimaginebundle.
@stof I couldn't immediately find out how to request a cherry-pick on Github so I posted the commit. My branch contains some other commits that wouldn't be of interest here.
@lsmith77 Yes, the design is not clean. The cache headers could be integrated into the cache resolver but they would also have to be set by the filter on its response to a non-cached request.
@MHeleniak Thanks for pointing out the headers. I actually realized that with my current code, only eTag should be used since last-modified wouldn't change if a filter configuration was updated.
The idea behind my implementation is that I don't want to handle storing filtered images on my server. I'll leave this to proxies.
from liipimaginebundle.
@advancingu there is nothing special to do on github. simply create a new branch locally from the current master of this repo, cherry-pick your commit and push and open a PR.
"The cache headers could be integrated into the cache resolver but they would also have to be set by the filter on its response to a non-cached request."
This should be entirely possible inside a custom cache resolver.
from liipimaginebundle.
Related Issues (20)
- Document how to resolve source image path
- Support for JsonManifestVersionStrategy
- getBrowserPath returns cached URL for type that was not requested HOT 1
- Add a warning message (or even error message) if cjpeg binary is from libjpeg-turbo instead of mozjpeg HOT 5
- Call to undefined method Symfony\Config\LiipImagine\ResolversConfig::webPath() HOT 2
- Overriding configuration for specific env is broken HOT 1
- Attempted to load class "AmazonS3" from the global namespace HOT 2
- Can't auto configure cache with s3
- Sylius Liip issue with cache generation....
- How to correct set cachePrefix for S3 resolver?
- Image not generating but the image link includes a resolve path. HOT 2
- Drop support for unsupported dependencies in v3 HOT 2
- Separate OneupFlysystem and league/flysystem-bundle in the docs HOT 4
- Provide a simple demo repo HOT 1
- Add Provider Data/Path to 404 when creating images HOT 1
- Use s3 for cached images too HOT 3
- Redirect not working when resolving the first time HOT 5
- Document integration with backblaze adapter
- help,how to override filter use programmatically HOT 2
- installation failure HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liipimaginebundle.