a simple time-based cache