interface IRepository {  Data getData();}class BaseRepository implements IRepository {  public Data getData() {    ...  }}class CacheRepository implements IRepository {  private final IRepository mRepository;  private final ICache mCache;  public CacheRepository(IRepository repository, ICache cache) {    mRepository = repository;    mCache = cache;  }  public Data getData() {    Data data = cache.getData();    if (data == null)      data = mRepository.getData();    mCache.setData(data);  }}The CacheRepository does two things, uses cache and gets data. How to improve it?
Cache repository violating the SRP
java;object oriented;repository;caching;single responsibility