Class DiningProxyService
java.lang.Object
edu.ucsb.cs156.diningcachingproxy.services.DiningProxyService
Shared cache-check/forward/store logic used by every proxy controller. A cache miss is forwarded
upstream with whatever
ucsb-api-key/ucsb-api-version headers the caller sent;
only a successful (2xx) upstream response gets cached. This is a byte-for-byte mirror of what the
upstream UCSB API would have returned — no dining-specific business logic (e.g. proj-dining's own
empty-response-to-204 conversion) belongs here.-
Constructor Summary
ConstructorsConstructorDescriptionDiningProxyService(CachedResponseRepository cachedResponseRepository, StatsService statsService, org.springframework.web.client.RestTemplate restTemplate, String upstreamHost, Clock clock) -
Method Summary
-
Constructor Details
-
DiningProxyService
public DiningProxyService(CachedResponseRepository cachedResponseRepository, StatsService statsService, org.springframework.web.client.RestTemplate restTemplate, @Value("${app.upstream.host}") String upstreamHost, Clock clock)
-
-
Method Details
-
proxyGet
-