Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1031411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T13:55:32+00:00 2026-05-16T13:55:32+00:00

I currently have my app caching image files in the cache sub-directory for the

  • 0

I currently have my app caching image files in the cache sub-directory for the application. The images are used in a ListView and stored in a HashMap of SoftReferences to Bitmaps.

So my question is this, what is the best way to cache these image files without inflating the space my application uses AND remains responsive from a user standpoint.

Things I am concerned about:

I know the user can clear the cache and that it is done automatically when space is low on internal memory, but I feel most users will see a several MB app and uninstall it. Also if the space is constantly low, my app will just keep downloading the images, making it appear slower.

Most devices have an SD card pre-installed, but what should I do when it is not inserted? The SD card may also be slower compared to internal storage, affecting my app’s performance.

Should I include an option to choose the location of the cache?

Should I attempt to manage the size of my cache (be it in the /cache or /sdcard) or just forget about it?

Thank you for your time (its a long one I know) and please post any relevant experience.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T13:55:33+00:00Added an answer on May 16, 2026 at 1:55 pm

    I can’t offer you a comprehensive set of best practices, but I can offer what I’ve learned so far:

    Managing your cache is a good idea. My app’s cache is such that I know that I’ll never need more than a certain number of cached files, so whenever I insert a new file into the cache, I delete the oldest files until I’m under the limit I have set. You could do something similar based on size, or simply age.

    Caching to the SD card, if it’s available, is a good idea if your cache needs to take up a lot of space. You’ll need to manage that space just as carefully, since it won’t automatically clear that space for you. If you’re caching image files, be sure to put them in a directory that begins with a dot, like “/yourAppHere/.cache”. This will keep the images from showing up in the gallery, which is really annoying.

    Letting the user choose the location of the cache seems like overkill to me, but if your audience is very geeky, it might be appreciated.

    I haven’t noticed a much of a penalty when caching to the SD, but I don’t know how your app uses that information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an internal enterprise app that currently consumes 10 different web services. They're
I have an Open Source app and I currently only post the binary for
I have a search form in an app I'm currently developing, and I would
I have a very large app, 1.5 million lines of C++, which is currently
We are currently storing plain text passwords for a web app that we have.
I currently have an MS Access application that connects to a PostgreSQL database via
I have an app that display's the current time when a page opens. I
I have a requirement on my current project (a Flex app which will be
I have Windows Vista MCML app, and I need to figure out the current
I currently have speakers set up both in my office and in my living

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.