Photo cache implementation