RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
Public Member Functions | |
size_t | get (const RTBKIT::AccountKey &account, const RTBKIT::UserIds &uids) |
void | inc (const RTBKIT::AccountKey &account, const RTBKIT::UserIds &uids) |
A very primitive storage for frequency cap events.
Ideally this should be replaced by some kind of low latency persistent storage (eg. Redis).
Note that the locking scheme for this class is unlikely to scale well. A better scheme is left as an exercise to the reader.
Definition at line 40 of file augmentor_ex.cc.
size_t RTBKIT::FrequencyCapStorage::get | ( | const RTBKIT::AccountKey & | account, |
const RTBKIT::UserIds & | uids | ||
) | [inline] |
Returns the number of times an ad for the given account has been shown to the given user.
Definition at line 45 of file augmentor_ex.cc.
void RTBKIT::FrequencyCapStorage::inc | ( | const RTBKIT::AccountKey & | account, |
const RTBKIT::UserIds & | uids | ||
) | [inline] |
Increments the number of times an ad for the given account has been shown to the given user.
Definition at line 54 of file augmentor_ex.cc.