4

The definition of CACHE_TEMPORARY used in cache_set reads as follows.

CACHE_TEMPORARY: Indicates that the item should be removed at the next general cache wipe.

I am just curious as to what General Cache Wipe means and what constitutes to General Cache Wipe other than obvious cron.

1 Answer 1

5

Any action that makes a call to either cache_clear_all(NULL, $table); on all core cache tables or a call to cache_clear_all(); can be termed as General Cache Wipe

I could list down following based on a quick grep search for these functios.

  1. Cron : Very obvious.
  2. When a vote is submitted on a poll.
  3. Any operation performed on admin/content page like
    • Node Multiple Delete. (Handled as a special case with confirmation form)
    • Any other operation like
  4. When node access is rebuilt. (Like change of permissions)
  5. When menu cache is cleared. (Node module clears all the caches [node_menu()])
  6. Node Form Submission. [Creation or Updation]
  7. Node Deletion
  8. Comment Form Submission
  9. Any operation performed on admin/content/comment page
  10. Block administration. Any action performed on admin/structure/block
  11. Create, Delete/Update any custom block.
  12. Any forum form submit.
  13. Any System Theme settings are changed.
  14. When aggregator parses a feed.
  15. Profile fields are edited/updated/deleted or their weights and categories are changed.
  16. When a user account is cancelled.
  17. When taxonomy term/vocabulary is added/deleted/updated.
1
  • So, if I call cache_set with CACHE_TEMPORARY, followed by cache_clear_all(), then the entry should be deleted from the database and a subsequent cache_get should not return the cached item? That doesn't seem to be the case :-(
    – Enno
    Aug 21, 2020 at 12:02

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.