1

Although in Performance, the Block caching is disabled but I've a block created by Clock module(http://drupal.org/project/clock) when accessed as anonymous user it does not update the clock on every page reload.

I've even tried clearning browser cache but it works fine when logged in. For registered users it seems block caching is disabled.

The Clock block is there in this site: http://bit.ly/PKI2M8 - please scroll to bottom-most right block titled 'Rail Time'.

How can I disable caching of this block?

2
  • I assume you have page caching enabled?
    – mpdonadio
    Commented Sep 22, 2012 at 19:48
  • Yes it is, but how can I disable caching of only selected blocks for anonymous users?
    – AgA
    Commented Sep 23, 2012 at 4:02

1 Answer 1

1

As MPD pointed out, page caching is your problem. Even with block caching disabled, the whole rendered page will be cached with page caching on, which includes any blocks no matter whether block caching is disabled or not.

As far as I know that leaves you with at least the following options:

  1. Take the easy route, and just disable page caching.
  2. Use JavasSript to set or update the time client side, you would still need an initial time source though, perhaps as outlined here.
  3. As a much larger project you could see how authcache works for serving it's blocks of user specific non-cached content while the majority of the page is cached, and implement it for anonymous users for just the time block.
  4. Use an iframe and get the contents from somewhere it isn't cached.
  5. There are probably more ways...
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.