Summary: Weak References do not always make the best caches
Caching vs. Weak References
A convenient and cute example of using weak references is to create a cache which "automatically" tunes itself based one which objects are still reachable. To do this the cache holds on to all of its entries via a weak reference and then simply allows the underlying objects to die when no longer needed.
While this makes for a great sample, it isn't necessary good caching policy: On the one hand, you might want to keep an unreachable entry because you expect the cache client will ask for that object in a moment and on the other hand you might want to discard or compact an otherwise reachable entry because it hasn't been accessed for a long time and it's not worth keeping.
Weak References can be helpful in creating caches but they aren't a magic solution, they should be evaluated in the context of good caching policy.
See also
Caching Implies Policy