Как правильно кэшировать мои API Symfony2?
Я делаю классические API RESTfull без сохранения состояния на Symfony2: пользователи / приложения получают токен аутентификации на API аутентификации и дают его всем другим API для регистрации и публикации данных / доступа, защищенных / личных / личных данных, на других API.
Теперь у меня есть три проблемы, связанные с этим рабочим процессом и кэшированием:
How to use HTTP cache for my 'static' APIs (that always deliver the same content, regardless the logged user and its token) assuming that different tokens would be passed in the url by different users for the same API, so that the url would never be the same? How to use HTTP shared cache then?
I've got APIs for the same url that produce a different output, regarding the logged user rights (I've basically 4 different rights levels). Question is: is it a good pattern? It is not better to have 4 different urls, one for each right, that I could cache? If not, how to implement a proper cache on that?
Is shared HTTP Cache working on HTTPS? If not, which type of caching should I implement, and how?
Спасибо за ваши ответы и свет на это.