Huy
05/05/2026, 11:24 AMAsk Inkeep
05/05/2026, 11:24 AMAsk Inkeep
05/05/2026, 11:25 AMreset() method. (2) Once you load permissions via loadLocalState() or loadLocalStateBulk(), they remain in the local state for the duration of the session unless manually cleared. (1) (2)
If you need time-based cache invalidation, you would need to implement that logic yourself by calling reset() and reloading permissions after your desired TTL expires. (2) Ask Inkeep
05/05/2026, 11:25 AMdavid
05/05/2026, 11:26 AMHuy
05/06/2026, 3:49 AMHuy
05/06/2026, 3:50 AMAsk Inkeep
05/06/2026, 3:50 AMAsk Inkeep
05/06/2026, 3:50 AMin-memory or redis (default is none)
⢠ā*PDP_CACHE_TTL*ā: Time-to-live in seconds for cached items (default is 3600)
⢠ā*PDP_CACHE_MEMORY_CAPACITY*ā: Memory capacity in MiB for in-memory cache (default is 128)
⢠ā*PDP_CACHE_REDIS_URL*ā: Redis connection URL when using redis store
The cache is supported for /allowed, /allowed/bulk, /user-permissions, and /authorized_users endpoints. (2) For the /allowed/bulk endpoint, the cache is applied to each individual query within the bulk request and is shared with the /allowed endpoint.
Note that while caching significantly improves performance, it may lead to temporarily inaccurate results if permissions change during the cache TTL period.
For your frontend, you can combine this PDP-level caching with your own client-side caching strategy. The PDP cache handles thAsk Inkeep
05/06/2026, 3:50 AMHuy
05/06/2026, 3:54 AMAsk Inkeep
05/06/2026, 3:54 AMAsk Inkeep
05/06/2026, 3:54 AMAsk Inkeep
05/06/2026, 3:54 AMHuy
05/07/2026, 8:19 AMHuy
05/07/2026, 8:20 AMHuy
05/07/2026, 8:20 AMAsk Inkeep
05/07/2026, 8:20 AMAsk Inkeep
05/07/2026, 8:20 AMgetUserPermission() or filtering instance-level permissions to extract only RBAC permissions for frontend initialization.
The sources discuss RBAC concepts and multi-tenant authorization patterns (1) (2) , but they don't provide detailed guidance on using getUserPermission() specifically for your use case of filtering out instance-level permissions.
For the best approach to initialize frontend permissions with RBAC-only data, I'd recommend reaching out to the Permit.io team directly at help@permit.io with:
1. Your specific use case (filtering instance_id permissions from getUserPermission() )
2. Your current implementation approach
3. Whether you're looking for RBAC-only permissions or a mix of authorization models
They can provide guidance on whether getUserPermission() is the right API for your needs or if there's a better approach for frontend permission initialization.Ask Inkeep
05/07/2026, 8:21 AMOr Weis
05/07/2026, 8:22 AMHuy
05/07/2026, 8:24 AMHuy
05/07/2026, 8:25 AMOr Weis
05/07/2026, 8:32 AMHuy
05/07/2026, 8:42 AM