function textsize_clear_cache() {
  $tables = array(
    'cache_page',
    'cache_block',
  );
  foreach ($tables as $table) {
    cache_clear_all('*', $table, TRUE);
  }
}

Is it really required to flush all the cache after every text size change? We use textsize module on a high traffic site and it seems to be absurd to throw away all the cache after any users change the textsize. I have not much knowledge on the mechanism of the module, but for me, this "clearing everything" seems to be a major bug. Let me know if there is a serious reason for doing that.

Comments

BBaptiste’s picture

Hi.

I've the same problem for Text Size 6.x-1.8.
When cache was enable on my website, the cache save pages with resized texts...
Anybody have solution ?

CZ’s picture

This is a web accessible module and keep the WCAG and BITV conditions. So it is JavaScript indipendent and use PHP as first. If it use JavaScript as first, it is not a web accessible module but cache handling indipendent (possible). Perhaps a solution is possible between them.

aron novak’s picture

But caching always different textsize for anonymous user - isn't it a bug? So even it seems that anonymous users can alter the text size without javascript, but it's not the case, a similar user using the site in the same time causes issues.

CZ’s picture

Category: bug » support

Anonymous users use different sessions. Cookies are required to store the text size. If Drupal cache the page (including font size), we have to clear the cache.

CZ’s picture

Status: Active » Needs review

Set the option "Scripting languages" to "Optimized for performance." and test it.

CZ’s picture

Status: Needs review » Closed (fixed)

I think it is good.