Problem/Motivation

I am experiencing a caching issue with the Rate module in Drupal 10. When a user votes (e.g., likes a node), the vote count is updated properly. However, when another authenticated user visits the same node and votes, the count appears to reset instead of incrementing.

Expected behavior:

If User A and User B like a node, the count should be 2.
When User C visits the node and likes it, the count should become 3.

Actual behavior:

If User A and User B like a node, the count correctly shows 2.
When User C visits and votes, the counter resets to 1 instead of increasing to 3.
If I check the node anonymously, the correct count (3) is displayed.

Possible cause:

It seems that the issue is related to caching for authenticated users. The vote count updates correctly in the database, but it appears that each user sees a separate cached version of the count rather than a globally updated count.

Steps to reproduce

Install and configure the Rate module on a Drupal 10 site (thumbs updown vote type).
Allow authenticated users to vote on a node.
User A and User B vote on a node. The count updates correctly.
User C visits the same node and votes. Instead of increasing, the count resets.
Viewing the node anonymously displays the correct total vote count.

Comments

alexius created an issue. See original summary.

ivnish’s picture

Version: 3.1.0 » 3.3.x-dev
Issue tags: -cache, -voting api

I can confirm this