Resource cache_time and personalized caching in OCAPI settings
Key Takeaway
With Site Page Caching on and personalized caching off, every customer whose request has the same cache key gets one shared cached Shop API response until cache_time runs out, and hooks don't run on those cache hits.
B2C Commerce caches Shop API responses in its own OCAPI cache. You control that cache with two properties on each resource in the OCAPI settings. cache_time sets how long a resource's response stays in the cache. personalized_caching_enabled decides whether responses are cached separately for each customer context. Good values reduce cache misses and improve performance. A wrong personalized caching setting can show one customer's content to other customers.
How the OCAPI cache works
The web tier does not cache OCAPI requests, because OCAPI has its own application-tier cache. OCAPI caching only works when "Site Page Caching" is enabled in Business Manager.
Each API handles caching in its own way:
| Caching | Can you configure it? | |
|---|---|---|
| Shop API | Most requests can be cached | Yes |
| Data API | Never cached | No |
| Meta API | Always cached for one day | No, you cannot change that TTL |
Because Data API requests are never cached, every Data API call costs real-time application-tier work.
Cache entries are based on responses, so every OCAPI request still costs the work to parse it and fetch documents, even on a cache hit.
Business Manager reports show cache behavior only for storefront pipeline requests, so you have no direct view of the OCAPI cache.