Giter VIP home page Giter VIP logo

Comments (3)

nkalupahana avatar nkalupahana commented on June 28, 2024

@stephan-fischer Hi! I'm not entirely sure I understand the use case. Under what circumstances would you want to add the exact same image to a user's photo library, over and over?

from media.

stephan-fischer avatar stephan-fischer commented on June 28, 2024

If the images are hosted on a CDN, the download costs traffic. There are certainly users who save the images several times, be it for tests, penetration, etc.

from media.

nkalupahana avatar nkalupahana commented on June 28, 2024

I'm sorry, but I'm still not seeing much of a use case for this feature. Users who are "testing" the app are probably just app developers, and adding a completely new feature to save developers a few seconds and a fraction of a fraction of a cent is probably not worth it :) Additionally, anyone who is trying to DoS/DDoS your CDN won't be doing it by clicking a button over and over in your app. They'll have some automated system to do it outside of the app, circumventing the caching (in the extremely unlikely case that someone specifically decides to target your app and cost you money -- in which case you have a much different set of problems haha). Adding this feature would also add a lot of unnecessary complexity. Some people might not want caching (e.g. if the image at the URL constantly changes), and then I'd need to add more information about how the caching works, and how to turn it off, and I'm just not seeing the benefits for something that has a very limited use case.

If you want caching, I recommend adding it to your CDN, instead of trying to implement it app-side, where it can easily be circumvented. (This is the industry standard approach.) Cloudflare is great for this -- putting Cloudflare in front of your CDN (completely free btw) will make subsequent requests free, and will automatically protect you from DoS/DDoS attacks. (https://developers.cloudflare.com/cache/concepts/default-cache-behavior/ -- when you set up Free Cloudflare for your site, images are automatically cached, so when images are repeatedly requested, subsequent requests won't cost you anything.)

from media.

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.