Stanford / WMD

WebAuth Module for Drupal
WMD
GNU General Public License v2.0
9 stars 9 forks source link

Do not cache WebAuth Authentication block. Prevents strange redirects #121

Closed jbickar closed 10 years ago

jbickar commented 10 years ago

On sites with caching enabled, we have had a lot of user confusion about where they get redirected to after login. This alleviates that confusion by not caching the WMD login block (so the destination is always the current page).

jbickar commented 10 years ago

@mistermarco plz review

mistermarco commented 10 years ago

What do you think of using DRUPAL_CACHE_PER_PAGE instead? (haven't tested)

jbickar commented 10 years ago

I can test. The difference is probably negligible, given the content of the block.

https://api.drupal.org/api/drupal/includes!common.inc/constant/DRUPAL_NO_CACHE/7

"For simple blocks (notably those that do not perform any db query), where querying the db cache would be more expensive than directly generating the content."

variable_get() - which is what's used to generate the content of that block - doesn't query the database.

On 7/31/14, 3:54 PM, Marco Wise wrote:

What do you think of using DRUPAL_CACHE_PER_PAGE instead? (haven't tested)

— Reply to this email directly or view it on GitHub https://github.com/Stanford/WMD/pull/121#issuecomment-50829514.

jbickar commented 10 years ago

cache per page works. You can see it on https://swsblog.stanford.edu

mistermarco commented 10 years ago

Thanks so much JB!