| 262 | } |
| 263 | |
| 264 | void inline SSLSessionBucket::print(const char *ref_str) const |
| 265 | { |
| 266 | /* NOTE: This method assumes you're already holding the bucket lock */ |
| 267 | if (!dbg_ctl_ssl_session_cache_bucket.on()) { |
| 268 | return; |
| 269 | } |
| 270 | |
| 271 | fprintf(stderr, "-------------- BUCKET %p (%s) ----------------\n", this, ref_str); |
| 272 | fprintf(stderr, "Current Size: %ld, Max Size: %zd\n", bucket_map.size(), SSLConfigParams::session_cache_max_bucket_size); |
| 273 | fprintf(stderr, "Bucket: \n"); |
| 274 | |
| 275 | for (auto &x : bucket_map) { |
| 276 | char s_buf[2 * x.second->session_id.len + 1]; |
| 277 | x.second->session_id.toString(s_buf, sizeof(s_buf)); |
| 278 | fprintf(stderr, " %s\n", s_buf); |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | void inline SSLSessionBucket::removeOldestSession(const std::unique_lock<ts::shared_mutex> &lock) |
| 283 | { |
no test coverage detected