3

I am not sure if this is a common problem. I use drupal 7 site with caching enabled. One of my pages is a simple poll. After anonymous voting, all cached pages are invalidated for current user. The cached pages remain in database so after clearing browser cache, current user sees cached pages again. Does poll use some sort of cookie that invalidates cache? How can I avoid such behavior? Thank you

2

After hours of testing, it looks like the Advanced Poll module does the job. Here is an excerpt about it from the module's project page:

... a replacement to Drupal's poll module and provides multiple voting systems, decision-making tools, and management options.

  • Voting systems: Basic polls, Approval Voting, Borda Count, and Instant-Runoff Voting.
  • Vote management: view each user's vote, delete all votes, or restrict the poll to a list of users.
  • Time management: schedule when to open or close the poll, and choose when to show results.
  • Choice management: write-in choices, and support for HTML (or other input filter).
  • Usability: fast Ajax interaction and customizable default settings.
  • Migration: convert regular Drupal polls into Advanced Polls.
0

Pages with functionality that need to change or request information from the database, in general can not be cached. Something like the Ajax Blocks module or a custom solution can help work around this. Here is an excerpt about it from that module's project page:

Permits to load some blocks by additional AJAX request after loading the whole cached page when the page is viewed by anonymous user. It is suitable for sites which are mostly static, and the page caching for anonymous users is a great benefit, but there are some pieces of information that have to be dynamic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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