| 110 | } |
| 111 | |
| 112 | bool redis_session::get_attrs(std::map<string, session_string>& attrs) |
| 113 | { |
| 114 | attrs_clear(attrs); |
| 115 | const char* sid = get_sid(); |
| 116 | if (sid == NULL || *sid == 0) { |
| 117 | return false; |
| 118 | } |
| 119 | |
| 120 | command_->clear(); |
| 121 | return command_->hgetall(sid, (std::map<string, string>&) attrs); |
| 122 | } |
| 123 | |
| 124 | bool redis_session::get_attrs(const std::vector<string>& names, |
| 125 | std::vector<session_string>& values) |