| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | $this->invalidateUser($op->userId); |
| | | |
| | | return true; |
| | | } |
| | | |
| | |
| | | ]; |
| | | |
| | | $updated = $wpdb->update($table, $data, $where); |
| | | $this->invalidateQueueCache(); |
| | | |
| | | if ($updated === 0) { |
| | | return true; |
| | |
| | | error_log('[Storage::saveFinal] DB error: ' . $wpdb->last_error); |
| | | return false; |
| | | } |
| | | $this->invalidateQueueCache(); |
| | | $this->invalidateUser($op->userId); |
| | | |
| | | return true; |
| | | } |
| | |
| | | $type, $userId |
| | | )); |
| | | |
| | | $this->invalidateUser($userId); |
| | | |
| | | return $row ? $this->rowToOperation($row) : null; |
| | | } |
| | | |
| | |
| | | |
| | | private function invalidateUser(int $userId): void |
| | | { |
| | | $this->cache->forget($userId); |
| | | Cache::for($userId.'_queue')->flush(); |
| | | } |
| | | public function getLastError(): string |
| | | { |