Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
59 | public function set($cacheKey, $data) |
||
60 | { |
||
61 | // Memcached considers TTL smaller than 60 * 60 * 24 * 30 (number of seconds in a month) |
||
62 | // as a relative value, so we will make sure that it is converted to a timestamp for consistent |
||
63 | // usage later on |
||
64 | if ($this->ttl < 60 * 60 * 24 * 30) { |
||
65 | $this->ttl = time() + (int) $this->ttl; |
||
66 | } |
||
67 | |||
68 | $this->memcached->set($cacheKey, $data, $this->ttl); |
||
69 | } |
||
70 | } |
||
71 |