2 Commits

2 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,8 @@ public class CacheConfig {
"kodikIDPlayerLink",
"shikimoriIDPlayerLink",
"kinopoiskIDPlayerLink",
"imdbIDPlayerLink");
"imdbIDPlayerLink",
"kodikPage");
}
}

View File

@ -4,6 +4,7 @@ import java.io.IOException;
import java.net.URI;
import java.net.URL;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import com.backend.extractor.kodik.service.anyame_backend.api.model.KodikVideoLinks;
@ -28,6 +29,7 @@ public class KodikNetworkService {
this.objectMapper = objectMapper;
}
@Cacheable("kodikPage")
public String fetchPage(String url) throws IOException {
Request request = new Request.Builder()
.url(normalizeUrl(url))