Running into an issue with QBCore's PlayerData cache not refreshing properly after a department transfer. When I run my transfer command TriggerServerEvent('qb-policejob:server:transferDepartment', {newDepartment = 'patrol', playerId = source}), the database gets updated correctly and statebags show the right department, but PlayerData.cache.department still returns the old department.
This means the UI keeps showing the wrong badge, vehicle spawns have old liveries, and department-restricted commands fail because it's checking against the cached (wrong) department. Only way to fix it is forcing the player to reconnect.
The statebag sync works fine and shows the correct new department value, just the client-side cache isn't getting invalidated properly. Anyone run into this with custom department systems on top of QBCore jobs?
ToxicGamer · 31/08/2026
Sign in to reply.