Fixed issue with scope

There was a bug with useCache and the scope of this.