* @brief add a cache to this server * return the index of the cache in this server * * @param cache * @return size_t */
| 64 | * @return size_t |
| 65 | */ |
| 66 | inline size_t add_cache(Cache&& cache) { |
| 67 | // this->_cache_vec.emplace_back(cache_size, cache_alg, hashpower); |
| 68 | |
| 69 | this->_cache_vec.push_back(std::move(cache)); |
| 70 | return this->_cache_vec.size() - 1; |
| 71 | } |
| 72 | |
| 73 | inline bool get(request_t* req) { |
| 74 | if (!_available) return false; |