kept cache with repository by using a change listener; moved constant