jenkinsci/jenkins — pull request #1055 by jglick (2013-12-10 19:42:12+00:00)
Title: [FIXED JENKINS-19400] Configurable retention system for lazy-loaded build references

[JENKINS-19400](https://issues.jenkins-ci.org/browse/JENKINS-19400). Allows simple retention policies to be set via system property (`-Djenkins.model.lazy.BuildReference.MODE=strong` for example).

More exotic policies could be added from plugins, for example to use a bounded LRU list, or to drop or downgrade references after a delay. If this seems to be going too far, the extension classes could be made private.

This is incompatible for anyone assuming a `BuildReference` is a `SoftReference`. I grepped all Java code in github.com/jenkinsci and found nothing outside of core referring to this class, so I think it is safe to make that change. (Code which held a reference of static type `BuildReference` and only called the `get()` method would not be broken.)

The logger is also handy as a way of determining when builds are loaded, which previously was difficult to do without a debugger as far as I know.