Permission Level Caching for a specific User


(Nic Hubbard) #1

I have a JSON API that I built using Matrix, but it isn't available to public users. So, we have a simple apiuser account that has access to the API endpoints.

 

This works great, but I would like to cache the pages because some are taking a while. I turned on "Permission Level Caching" in the Cache Manager, but it doesn't seem to have helped at all.

 

Is there something else that I need to do to be able to get caching working for this logged in user? Or, alternately, can I just cache the pages for THIS user, but no other logged in users?


(Marcus Fong) #2

Hi, Nic - try enabling Group Level Caching?


(Nic Hubbard) #3

Hi, Nic - try enabling Group Level Caching?

 

Would that help? The user isn't part of a group. Should it be?

 

Will test.


(Nic Hubbard) #4

Looks like that worked. Got a bit confused on Permission Level Caching vs. Group Level Caching.


(Marcus Fong) #5

You’re not confused, Nic - it’s actually a bug in Permission Level Caching. We’d noticed it recently while working on a client project and were discussing it with Squiz Labs, after which I saw your post.

The bug appears to have been around for quite a while without anybody realising it. My guess as to why is that Permission Level Caching is rarely enabled, and when it is there’s a tendency to tick all the boxes, which masks the issue by enabling Group Level Caching.


Squiz Labs is currently testing a patch: https://squizmap.squiz.net/matrix/7642