Make cache timeout overridable

The setting could not be set from outside the app. Attached a patch wich enables this.