Cache fix

Sorry for delay. Please test it before merging to master. U use it almost like this.