public RepositoryDTO getOrFindUserRepository ( String user , String repositoryName , GitRepoClient repoClient ) { RepositoryDTO repository = getUserRepository ( user , repositoryName ) ; if ( repository == null ) { List < RepositoryDTO > repositoryDTOs = repoClient . listRepositories ( ) ; updateUserRepositories ( repositoryDTOs ) ; repository = getUserRepository ( user , repositoryName ) ; } return repository ; }
Attempts to use the cache or performs a query for all the users repositories if its not present