CacheAccess

interface CacheAccess

Provides basic access to a response caching implementation.

This interface does not make any guarantees about the caching behavior of its implementations.

Since

0.1.0

Functions

Link copied to clipboard
abstract fun <T> memoize(response: Gw2ApiResponse<T>)

Memoizes the given Gw2ApiResponse.

Link copied to clipboard
abstract fun <T> query(request: Gw2ApiRequest<T>): Gw2ApiResponse<T>?

Queries the cache for a given Gw2ApiRequest and returns the cached Gw2ApiResponse or null if no appropriate response was cached.