| 71 | } |
| 72 | |
| 73 | inline bool get(request_t* req) { |
| 74 | if (!_available) return false; |
| 75 | |
| 76 | for (int i = 0; i < this->_cache_vec.size(); i++) { |
| 77 | // check each cache in this server |
| 78 | bool hit = this->_cache_vec.at(i).get(req); |
| 79 | |
| 80 | if (hit) return true; |
| 81 | } |
| 82 | |
| 83 | return false; |
| 84 | } |
| 85 | |
| 86 | inline bool set_unavailable() { |
| 87 | _available = false; |