1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.expire = expire;
|
7 |
|
8 | var _keyspaceNotifications = require('../keyspace-notifications');
|
9 |
|
10 | function expire(key, seconds) {
|
11 | if (!this.data.has(key)) {
|
12 | return 0;
|
13 | }
|
14 |
|
15 | this.expires.set(key, seconds * 1000 + Date.now());
|
16 | (0, _keyspaceNotifications.emitNotification)(this, 'g', key, 'expire');
|
17 |
|
18 | return 1;
|
19 | } |
\ | No newline at end of file |