I was trying to cancel my vote and revote again as a test and was finding that I only kept getting the cancel vote button to show up. I looked through and found that there was no implementation of hook_flush_caches() which is what allows for drupal to know which cache tables can be flushed.

Attaching the patch made from diff.

CommentFileSizeAuthor
flush-cache.patch392 bytesbtmash

Comments

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for the patch here. However, the lack of cache clearing in general is by-design. This cache is not supposed to be cleared unless the vote is deleted. This *should* be accomplished by decisions_votingapi_delete() -- Can you confirm that this function isn't working properly?

btmash’s picture

The name for the table is quite misleading then. I would imagine tables following the cache_* format of naming cache tables should be allowed to flush the cache when a call to flush all caches is made (decisions_cache would not be quite as misleading in a similar vein as the votingapi_cache).

Back on point, however - while the decisions_votingapi_delete does remove the vote, the decisions_reset_form_submit does not (it explicitly only removes from votingapi).

btmash’s picture

Status: Postponed (maintainer needs more info) » Needs review

Was never looked at - felt this is still necessary.