| 157 | } |
| 158 | |
| 159 | bool redis_session::set_timeout(time_t ttl) |
| 160 | { |
| 161 | const char* sid = get_sid(); |
| 162 | if (sid == NULL || *sid == 0) { |
| 163 | return false; |
| 164 | } |
| 165 | |
| 166 | command_->clear(); |
| 167 | return command_->expire(sid, (int) ttl) > 0 ? true : false; |
| 168 | } |
| 169 | |
| 170 | } // namespace acl |
| 171 |