I think this should be done even before checking restricted or not.
This will also make the result go into the cache.