caching patch by Michael Grigoriev
6 files changed