@@ 53-59 (lines=7) @@ | ||
50 | $this->userId = $userId; |
|
51 | } |
|
52 | ||
53 | public function boardChanged($boardId) { |
|
54 | $time = time(); |
|
55 | $etag = md5($time . microtime()); |
|
56 | $this->cache->set(self::TYPE_BOARD . '-' . $boardId, $etag); |
|
57 | $sql = 'UPDATE `*PREFIX*deck_boards` SET `last_modified` = ? WHERE `id` = ?'; |
|
58 | $this->db->executeUpdate($sql, [$time, $boardId]); |
|
59 | } |
|
60 | ||
61 | public function cardChanged($cardId, $updateCard = true) { |
|
62 | $time = time(); |
|
@@ 78-86 (lines=9) @@ | ||
75 | } |
|
76 | } |
|
77 | ||
78 | public function stackChanged($stackId, $updateBoard = true) { |
|
79 | $time = time(); |
|
80 | $etag = md5($time . microtime()); |
|
81 | $this->cache->set(self::TYPE_CARD . '-' .$stackId, $etag); |
|
82 | if ($updateBoard) { |
|
83 | $sql = 'UPDATE `*PREFIX*deck_stacks` SET `last_modified` = ? WHERE `id` = ?'; |
|
84 | $this->db->executeUpdate($sql, [time(), $stackId]); |
|
85 | } |
|
86 | } |
|
87 | ||
88 | public function checkEtag($type, $id) { |
|
89 | $etag = $this->getEtag($type, $id); |