MarketApi is now wrapped in an Arc for cheap cloning
Generic Cache implementation for caching records for /units-for-slot route
Implementations for the generic Cache (mod supermarket::cache::market), caching the following calls:
GET AdSlot from Market - mod supermarket::cache::market::ad_slot
type AdSlotCache = Cache
impl ClientLike for AdSlotClient with calls via the MarketApi
GET AdUnit from Market (AdSlot's fallback unit) - mod supermarket::cache::market::ad_unit
type AdUnitsCache = Cache
impl ClientLike for AdUnitsClient with calls via the MarketApi
GET AdUnits (fetched by Ad Type from the Market) - mod supermarket::cache::market::ad_unittype AdTypeCache
type AdTypeCache = Cache
impl ClientLike for AdTypeClient with calls via the MarketApi
mod supermarket::cache moved to supermarket::cache::campaign - the Cache implementation for Campaigns is now moved to separate, own module
struct Caches (mod supermarket::cache) implementation that contains all the cache implementations in 1 struct
TODOs:
Way to clean all Caches from struct Caches
Mocked clients for AdSlotCache, AdUnitsCache, AdTypeCache
Simplify tests by creating Mocked clients for AdSlotClient, AdUnitsClient & AdTypeClient instead of mocking the API calls in /units-for-slot tests (units_for_slot_tests.rs)
Resolves #43
CHANGELOG:
MarketApi
is now wrapped in anArc
for cheap cloningGeneric
Cache
implementation for caching records for/units-for-slot
routeImplementations for the generic
Cache
(mod supermarket::cache::market
), caching the following calls:GET AdSlot
from Market -mod supermarket::cache::market::ad_slot
type AdSlotCache = Cache
impl ClientLike for AdSlotClient
with calls via theMarketApi
GET AdUnit
from Market (AdSlot
's fallback unit) -mod supermarket::cache::market::ad_unit
type AdUnitsCache = Cache
impl ClientLike for AdUnitsClient
with calls via theMarketApi
GET AdUnits
(fetched byAd Type
from the Market) -mod supermarket::cache::market::ad_unit
type AdTypeCache
type AdTypeCache = Cache
impl ClientLike for AdTypeClient
with calls via theMarketApi
mod supermarket::cache
moved tosupermarket::cache::campaign
- theCache
implementation forCampaign
s is now moved to separate, own modulestruct Caches
(mod supermarket::cache
) implementation that contains all the cache implementations in 1 structTODOs:
struct Caches
AdSlotCache
,AdUnitsCache
,AdTypeCache
AdSlotClient
,AdUnitsClient
&AdTypeClient
instead of mocking the API calls in/units-for-slot
tests (units_for_slot_tests.rs
)