Comments (3)
So, to be perfectly honest, I was worried about this use case. Before we ever wanted to build TIP, Twitter took the approach of never reusing image URLs. There are pros and cons to both, but the reuse of image URLs offered far too much complexity and we opted for every image to be unique (with modifiers for size variants of course). When I had written the TIP proposal I had proposed handling the reused image URL problem within TIP but it was eliminated as out of scope right away and we never pursued it. I am sorry that our scope defeats what I'd hoped for this framework as a framework for all use cases.
Given where that leaves us, I think there are a few options for you: 1) try to build a separate layer of code on top of or around TIP to support the use case (really focus TIP on the fetching/caching and you control the aging and reloading). 2) use the features TIP offers to glue something together (such as restricting what caches to hit, using a unique modifier to the real URL and hydrating the URL request being sent, utilizing image previews, using multiple siloed pipelines, using a hacked "alternative cache" and/or having a custom network layer plugged in). 3) fork TIP and see if you are able to add the feature directly.
If you pursued no-3, I would be very open to a PR to add that functionality to TIP but cannot really promise resourcing to support building it end-to-end.
Really sorry about the use case you have not meshing with TIP. I know it's unfair, but no-4 would also be to have the backend change to always use unique URLs.
from ios-twitter-image-pipeline.
Thanks for your detailed answer. Yes, I'm starting to see that ideally, all our image URL's should be unique. For the long term, this would save us a lot of headaches. But as always, there will be more pressing matters to focus on, and we will likely need to do correct HTTP caching as well before this.
Meanwhile, we will evaluate each of your suggestions and see if any of them makes it feasible for use to use TIP in our application. I'd love to make a fork and incorporate this in the library somehow. Let's see how much time we can motivate spending on this π
from ios-twitter-image-pipeline.
If you do fork, I can recommend looking at keeping things in line with how we do resumable downloads. If a condition is met that you want to check the network for a 304 (unchanged) or a 200 (changed, new bytes), the logic would be very similar to a resumed download, with the minor difference being you have all the bytes already. That's how I was thinking of it anyway.
from ios-twitter-image-pipeline.
Related Issues (20)
- Change imageIdentifier later? HOT 2
- Controlling Animation on TIPImageView HOT 3
- Hydration Block Confusion HOT 2
- why rendered cache? HOT 1
- Is it suitable for the project which donβt have many different sizes of images? HOT 3
- Is it possible to set a maximum file size for image download / cacheing? HOT 1
- tvOS Platform Support HOT 2
- What kind of crash would be triggered when concurrently access to CGContext HOT 2
- Can't link to app HOT 5
- 2.11 not on CocoaPods? HOT 2
- Duplicate info.plist file in 2.11 Pods HOT 2
- Setting maxBytes = 0 does not work HOT 2
- Signed/Unsiged Build Failure on Xcode 11 beta 1 HOT 1
- ITMS-90338: Non-public API usage - imageDimensions, imageFilePath HOT 2
- 2.13.0 is the latest version on cocoapods HOT 7
- Detecting WebP via TIPDetectImageType and TIPDetectImageTypeFromFile? HOT 1
- Image decoding/decompression still happening on the main thread HOT 5
- Please release 2.25.0 via CocoaPods HOT 2
- Leverage iOS 15 image decoding
- changes to continuous integration
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 ios-twitter-image-pipeline.