B22DCCN393 Nguyễn Việt Huy
03/28/2026, 2:48 PM2026-03-27T08:47:23.988300+0000 | horizon.pdp | INFO | Removing callback '<http://localhost:8181/v1/data/permit/rebac/cache_rebuild>' from the register
Does disabling the cache make PDP slower, and how can I enable it again?Ask Inkeep
03/28/2026, 2:48 PMAsk Inkeep
03/28/2026, 2:48 PMcache_rebuild callback is normal PDP behavior and doesn't necessarily mean your cache is disabled. (1)
The PDP includes a configurable caching mechanism that significantly improves performance by reducing redundant policy evaluations. (2) When enabled, the cache stores results of policy decisions with a configurable time-to-live (TTL) .
*To configure the PDP cache*, use these environment variables: (3)
*`PDP_CACHE_STORE`* - The cache storage type. Options include: none, in-memory, and 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 (when using in-memory store) . Default is 128.
*`PDP_CACHE_REDIS_URL`* - Redis connection URL (when using redis store) . Default is "" (empty string) .
*To enable caching*, set the PDP_CACHE_STORE environment variable to either in-memory or `redis`:
PDP_CACHE_STORE=in-memory
Or for Redis-based caching:
PDP_CACHE_STORE=redis
PDP_CACHE_REDIS_URL=<redis://your-redis-host:6379>
Yes, disabling the cache can make the PDP slower, as caching significantly improves performance for frequently evaluated permissions. (2) The cache is supported for /allowed, /allowed/bulk, /user-permissions, and /authorized_users endpoints.
To help investigate further, could you share:
1. Which Workspace / Project / Env you are using
2. What calls you are performing (as SDK code or CURL)
3. Which PDP version you are running
4. Relevant logs from your PDPAsk Inkeep
03/28/2026, 2:48 PMAsk Inkeep
03/28/2026, 2:49 PMB22DCCN393 Nguyễn Việt Huy
03/28/2026, 2:56 PM/allowed endpoint again after some time, the latency goes up to around 300 ms. I don’t understand what happenedB22DCCN393 Nguyễn Việt Huy
03/28/2026, 2:58 PMdavid
03/29/2026, 1:05 AMB22DCCN393 Nguyễn Việt Huy
03/29/2026, 5:22 AMdepartment#thanh_vien (thanh_vien = member in English) inherits from document#thu_ky (thu_ky = secretary in English). After setting up the inheritance rule, I repeatedly changed the policy of a document and tested it with /allowed. The result was that the first request after a policy change took longer to evaluate, and it only became fast from the second request onwardB22DCCN393 Nguyễn Việt Huy
03/29/2026, 5:25 AMrebac/cache_rebuild is causing this issue, because I previously saw that rebac/cache_rebuild was still present in older PDP versionsB22DCCN393 Nguyễn Việt Huy
03/29/2026, 5:29 AMdepartment and document againOr Weis
03/29/2026, 9:02 AMOr Weis
03/29/2026, 9:03 AMendpoint again after some time, the latency goes up to around 300 msThat’s (probably) just cache TTL expiring. I’m not really sure what is the issue you’re trying to solve; is seems your PDP and its cache are performing well . Once in a while cache invalidation is a normal behavior
B22DCCN393 Nguyễn Việt Huy
03/29/2026, 10:13 AMB22DCCN393 Nguyễn Việt Huy
03/29/2026, 10:17 AMOr Weis
03/29/2026, 10:20 AMOr Weis
03/29/2026, 10:22 AMOr Weis
03/29/2026, 10:22 AMB22DCCN393 Nguyễn Việt Huy
03/29/2026, 10:31 AMOr Weis
03/29/2026, 10:32 AMOr Weis
03/29/2026, 10:33 AMB22DCCN393 Nguyễn Việt Huy
03/29/2026, 10:33 AM