implement repository cache