Cache system isn't doing CACHE_TEMPORARY like documented

R.Muilwijk - July 1, 2008 - 22:24
Project:Drupal
Version:7.x-dev
Component:base system
Category:bug report
Priority:critical
Assigned:Unassigned
Status:duplicate
Description

I don't know or this is wrong in the documentation or in the code. The function 'cache_get' has documented:

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

However when life time is on and the general wipe is done the temporary cache ain't removed at the moment. Because I think the code is leading there should be added a little. After fixing this the test at http://drupal.org/node/276267 should be fixed.

#1

R.Muilwijk - July 1, 2008 - 22:25

Last paragraph should be:

However when life time is on and the general wipe is done the temporary cache ain't removed at the moment. Because I think the code is leading there should be added a little comment with th exeption when life is enabled. After fixing this the test at http://drupal.org/node/276267 should be fixed.

#2

catch - July 1, 2008 - 23:43

I think this is the same bug Morbus brought up in http://lists.drupal.org/pipermail/development/2008-June/030247.html (no solution there either)

Could we make minimum lifetime one second or something?

#3

R.Muilwijk - July 2, 2008 - 05:50

nah, that is the one that makes

cache_clear_all('', 'cache')'

never called so you can't really use expiry in the 'cache' table.

This bug however shows a wrong documentation or wrong implemented code. The code says when using life time the cache stays for that period of time but the documentation says it will be removed after every general wipe.

My suggestion is to add to the documentation something like:

*   - CACHE_TEMPORARY: Indicates that the item should be removed at the next
*     general cache wipe or when cache lifetime is enabled after it's expirations first wipe.

#4

catch - July 22, 2008 - 12:08

Just a note that there's a patch which was applied to D6 but never made it into D7 that's at least somewhat related. The test still fails wth it applied though #226728: Temporary cache table entries are not flushed.

#5

unknownguy - August 4, 2008 - 08:52

catch, can you point us to the patch you are talking about ?

Thanks.

#6

catch - August 4, 2008 - 13:07

unknown guy - I linked to it in #4 #226728: Temporary cache table entries are not flushed

#7

sime - October 28, 2009 - 06:35
Status:active» duplicate

Linked issue is now for D7, makes this a duplicate now, I assume.

 
 

Drupal is a registered trademark of Dries Buytaert.