RESTful-Drupal / restful

RESTful best practices for Drupal
https://drupal.org/project/restful
419 stars 173 forks source link

Performance: \RestfulManager::invalidateEntityCache calls getAccount(FALSE) #502

Open amitaibu opened 9 years ago

amitaibu commented 9 years ago
        // Get the uid for the invalidation.
        try {
          $uid = $handler->getAccount(FALSE)->uid;
        }

This means that on every \RestfulManager::invalidateEntityCache we re-authenticate the same user. @mateu-aguilo-bosch do you remember the reason for disabling the static cache here?

e0ipso commented 9 years ago

Yes, it's because if we don't accept any authenticaction provider, but authentication is optional the expected result is the anon user. If we accept cookie, the expected result is the logged in user. This means different results depending on the plugin definition.