zostay/CPAN-Sidekick — Issue #5: Gravatar is unreliable; add an LRU cache for icons
Author: zostay
Created: 2012-02-28 15:11:09+00:00
State: open

The app needs a small cache of Gravatar images. I've thought of a few strategies to set up a modified LRU cache to optimize how we select images to keep cached, but I think I'll stick to a simple LRU to start with. We'll need to:

* Create a list of most recently used Gravatar icons, probably using SQLite, then
* Keep a cache of them on the file system and
* Delete them when the total size of the cache exceeds some threshold.
* I need to experiment to see what that threshold should be. It should probably be just big enough to show a few dozen and based upon whether the phone is l/m/h/xhdpi.