repository::need_update() implementation.
repository::repository() refactoring.
cache implementation.