| 60 | } |
| 61 | |
| 62 | bool memcache_session::set_attrs(const std::map<string, session_string>& attrs) |
| 63 | { |
| 64 | const char* sid = get_sid(); |
| 65 | if (sid == NULL || *sid == 0) { |
| 66 | return false; |
| 67 | } |
| 68 | |
| 69 | string buf; |
| 70 | serialize(attrs, buf); // ������� |
| 71 | time_t ttl = get_ttl(); |
| 72 | return cache_->set(sid, buf.c_str(), buf.length(), ttl); |
| 73 | } |
| 74 | |
| 75 | bool memcache_session::remove(void) |
| 76 | { |