Fixed unnecessary locking when calling caching method with different arguments