Updated clearcache to take in a workspace parameter