Skip to content

Implement a custom image caching/downloading system  #2

@RobertLK

Description

@RobertLK

Context

Specs

  • Can hold up 10k elements (on disk)
  • when the 10001 element wants to be cached, the image that was used the least should be uncached (aka if 9999 were requested twice and 1 image was requested once, the latter should be uncached). If two (or more) elements have the same lowest count, uncache any of them.
  • public interface should be :
    interface MySuperCache {
         void get(String imageUrlString, CacheCallback completionBlock);
     }

    interface CacheCallback {
        void onImageRetrieved(Bitmap image);
    }
  • Class(es) should be testable and tested
  • Don't use HttpResponseCache or LruCache
  • Don't use external frameworks (we know they exist)
  • Should be reusable (this is why the interface is generic)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions