Block caching works per user but actually should be per session so no reason in caching at all.

Updates before 7000 is useless so removed. Update 7000 has wrong db_update() so fixed.

Info file files[] section should contain only files with class definitions.
Also added "configure" link for modules listing page.

Comments

deekayen’s picture

Status: Needs review » Needs work

I don't think I agree with the BLOCK_NO_CACHE setting. That constant is intended for blocks that don't do any querying. In the case of masquerade, it does query, but doesn't change until you actually masquerade, in which case the switch back link is different from what other non-masquerading users would see.

Please elaborate on your reasoning there since I'm still thinking BLOCK_CACHE_PER_USER was the right pick.

andypost’s picture

in which case the switch back link is different from what other non-masquerading users would see.

Why are you thinking so? If one of user's sessions submits form from block other sessions still have last saved block... tested.

We need different blocks for the same user same time.
For example I have 2 sessions using 2 browsers: in one browser I'm masquerading in second I'm not.

So what do you think the block cache should store?

Suppose the only possible cache strategy is form cache - this actually needs work

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new4.72 KB

Fixed install query.

I found that if we try a form cache so for every page we have new form_build_id so form is cached per page...

EDIT: Another reason to not cache blocks - quickswitch links should be rendered per session because of drupal_get_token() used

andypost’s picture

Status: Needs review » Fixed
StatusFileSize
new1.2 KB

I've fixed block cache, suppose #2-#3 is enough

patch commited to @master http://drupalcode.org/project/masquerade.git/commit/7193ba4

andypost’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Priority: Normal » Major
Status: Fixed » Patch (to be ported)

Block cache should be backported to 6 but not sure we need to move updates from 6.x to 7.x

b-prod’s picture

With Drupal 6.20, the block cache per user makes the autocomplete fail. With NO_CACHE it works.

andypost’s picture

Is this still an issue?

b-prod’s picture

Even for version 6.22 of D6, it is still an issue.

andypost’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new883 bytes

@B-Prod please test this patch, I'm going to commit it but I needs some reviews.

And can you explain a case when you affected this issue, suppose when one user works in different browsers

EDIT: you need to run update.php after applying patch

b-prod’s picture

Status: Needs review » Reviewed & tested by the community

This patch worked for me.

Actually the problem for 6.x branch was that the JS file was not added on certain conditions. So the autocomplete behavior failed. I am sorry but I do not remember much more, since it fixed that a long time ago on a delivered project.

andypost’s picture

Status: Reviewed & tested by the community » Fixed

Commited

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 7193ba4 on master, 8.x-2.x, 8.x-2.x-admin-menu, 8.x-1.x-1836516 by andypost:
    Issue #1007052 by andypost: Block should not be cached
    
    

  • Commit 7193ba4 on master, 8.x-2.x, 8.x-2.x-admin-menu, 8.x-1.x-1836516 by andypost:
    Issue #1007052 by andypost: Block should not be cached