yumoqing 8cec17c042 feat: add cross-process cache invalidation via Redis Pub/Sub
- userperm.py: All invalidate_* and on_* handlers changed to async
  - Each invalidation now broadcasts via cache_sync.invalidate()
  - invalidate_user_cache() -> 'rbac:ur:{userid}'
  - invalidate_all_user_caches() -> 'rbac:ur:all'
  - invalidate_rp_cache() -> 'rbac:rp'

- init.py: Added start_cache_sync() async function
  - Starts Redis Pub/Sub subscription
  - Registers callbacks for rbac:rp and rbac:ur:all channels

- set_role_perms.py: CLI script now sends invalidation after execution
  - send_rbac_invalidation() starts cache_sync, publishes, then stops

Compatible with existing EventDispatcher (already supports async handlers)
2026-05-26 13:52:10 +08:00
2026-03-25 14:14:47 +08:00
2026-05-22 17:21:00 +08:00
2025-07-16 14:19:12 +08:00
2025-07-16 14:19:12 +08:00
2025-07-16 14:19:12 +08:00
2025-07-16 14:19:12 +08:00
2026-04-16 14:36:29 +08:00

rbac

Description
No description provided
Readme 1 MiB
Languages
Python 88.5%
CSS 10.8%
Shell 0.7%