ICache

Undocumented in source.

Members

Functions

cacheResponse
bool cacheResponse(HttpRequestParameters request, HttpResponse response)

The given request has received the given response. The implementing class needs to decide if it wants to cache or not. Return true if it was added, false if you chose not to.

getCachedResponse
const(HttpResponse)* getCachedResponse(HttpRequestParameters request)

The client is about to make the given request. It will ALWAYS pass it to the cache object first so you can decide if you want to and can provide a response. You should probably check the appropriate headers to see if you should even attempt to look up on the cache (HttpClient does NOT do this to give maximum flexibility to the cache implementor).

Meta