Giter VIP home page Giter VIP logo

Comments (9)

tonnguyen avatar tonnguyen commented on August 24, 2024

Hi Lexs,

Is it possible to write cache into a cache directory which is located in SD Card?(/mnt/sdcard/data/somepackagename/cache/images/)

In my opinion, Android would never clear this, and this could be a workaround.

from disklrucache.

lexs avatar lexs commented on August 24, 2024

Yes, this would work but will introduce other problems, for example that SD storage can be removed at any time or not even be available. I guess these issues could be worked around as well though.

from disklrucache.

JakeWharton avatar JakeWharton commented on August 24, 2024

Give the dev branch a try. Threw in a quick sanity check and attempted directory recreation.

from disklrucache.

JakeWharton avatar JakeWharton commented on August 24, 2024

Gerrit tracking: https://android-review.googlesource.com/31430

from disklrucache.

lexs avatar lexs commented on August 24, 2024

What happened to this? Should I still try dev? I'm asking as my image loader is based on this and when they user clicks "clear cache" in app info all new writes will fail if the app was open.

from disklrucache.

JakeWharton avatar JakeWharton commented on August 24, 2024

It's fixed on dev but I didn't like the solution. Maybe @swankjesse can comment as to a better solution.

from disklrucache.

swankjesse avatar swankjesse commented on August 24, 2024

My original preference was for the cache to stop caching if ever it runs into a hostile storage system. But in @lexs scenario, that's probably to heavy-handed. It would probably be more robust for the cache tried its best to keep caching even as things disappeared out from under it.

That way, if a user clicks 'clear cache' while the app is open, performance won't degrade indefinitely.

@JakeWharton can you assign this to me? I'll code up a fix.

from disklrucache.

swankjesse avatar swankjesse commented on August 24, 2024

Sadly I still haven't gotten around to doing this work. If you'd prefer to tackle it, it's all yours. Otherwise I'll circle back when I have time.

from disklrucache.

JakeWharton avatar JakeWharton commented on August 24, 2024

New implementation of this on dev.

from disklrucache.

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.