Might be misunderstanding the cache system but - we call cache_set:
cache_set($cache_name, $tags);
The API says that cache_set is:
cache_set($cid, $data, $table = 'cache', $expire = CACHE_PERMANENT, $headers = NULL)
So - the default value for expire is CACHE_PERMANENT - meaning "Indicates that the item should never be removed unless explicitly told to using cache_clear_all() with a cache ID"
However - there is no call to cache_clear_all (that I can see).
I do know that unless I go in to the database and clear the cache table I never get an update in my tagadelic block (I _do_ get updates for the /tagadelic pages).
Would that be better with an expire of CACHE_TEMPORARY ?
Comment | File | Size | Author |
---|---|---|---|
#16 | tagadelic_cache_inc_install.patch | 1.32 KB | chrissearle |
#15 | tagadelic_cache.patch | 600 bytes | chrissearle |
#2 | tagadelic_cache.patch | 600 bytes | chrissearle |
Comments
Comment #1
joewang CreditAttribution: joewang commentedI have this same issue with 6.x-1.0. I guess I just have to change that line for right now.
Comment #2
chrissearle CreditAttribution: chrissearle commentedPatch for the 6.x branch attached.
Comment #3
joewang CreditAttribution: joewang commentedComment #4
2createwdrupal CreditAttribution: 2createwdrupal commentedI tried that patch. Tagadelic still didn't update. puzzling - before it would if I clicked the module, but now, nothing makes it update.
Comment #5
chrissearle CreditAttribution: chrissearle commentedAt what point did it not update? The patch has only to do with cache handling at cron time.
Comment #6
2createwdrupal CreditAttribution: 2createwdrupal commentedI think, though this is just a guess, that tagadelic stopped updating after updating drupal to 6.6,
I run crom manually once or twice a day and tagadelic hasn't changed since about when I went to 6.6
Comment #7
2createwdrupal CreditAttribution: 2createwdrupal commentedI just went to admin > blocks > tagadelic
I did not change anything, but clicked "save" and tagadelic has now updated. Not sure if I'll have to do that everytime, but at least it's working.
thanks
Comment #8
sirio81 CreditAttribution: sirio81 commentedHi all, I confirm the problem.
I removed tags from some nodes and they are still shown in tagdelic block.
I applied the patch and run cron.php but nothing has changed.
I also tried to go in admin > blocks > tagadelic and press "save" but it didn't help.
Please, can you fix this bug?
Comment #9
chrissearle CreditAttribution: chrissearle commentedFor those testing:
What the patch does is to change the cache type from permanent to temporary when the cache is populated.
Temporary caches are removed (as far as I can tell) by cron - not sure if there is an aging limit here - I'll try and find out.
HOWEVER:
This won't (again as far as I can tell) remove any existing entries from the cache table that were added as permanent (this is because it only adds the tags to the cache if there are no tags present and permanent tags are not removed by cron).
So - if you have tagadelic running, then patch it - any existing cache data is already there and marked permanent. This will not disappear by cron.
So - when applying the patch - remember to empty the table "cache" in your database - otherwise those entries will hang around.
This is a one-off at patch time. After this - all entries should be marked temporary and handled appropriately by cron etc.
Comment #10
2createwdrupal CreditAttribution: 2createwdrupal commentedHi @sirio81
You might have missed a step - and maybe I did not make it clear when I posted before -
In admin > blocks, click "configure" tagadelic, then save. No need to save blocks, just the configure tagadelic. And, yes, I do have to do this each and every time I want the tagadelic cloud to update. Hopefully, there will be an update to the module to fix this.
My site, still developing, but coming along:
http://www.fromoutoftheblue.com
Peter
Comment #11
sirio81 CreditAttribution: sirio81 commentedI resolved cleaning the cache
settings/performance/ clear cache data
I aslo disabled "Block cache" but I don't realy know if it helps.
Thank you.
Comment #12
chrissearle CreditAttribution: chrissearle commentedAs far as I understand it - this patch seems to be working for people as long as they remember to clear the cache at the point they install the patched version. So I think the patch itself is probably worth setting back to "needs review".
However - I have no idea how a module should handle "need to clear out old cache data at upgrade" - would we need a patch to the .install too?
Comment #13
2createwdrupal CreditAttribution: 2createwdrupal commentedTagadelic does seems to be updating now on its own with the patch. Maybe it happened after emptying cache. I'm not sure, but suddenly it's working.
Thanks!
Comment #14
chrissearle CreditAttribution: chrissearle commented2createwdrupal - actually - that's exactly what I would expect - the patch will only work if old cache data (pre-patch) is removed. So - if its working for you now after clearing it that confirms what I expected (which is good - hopefully it means I understood things) ;)
Comment #15
chrissearle CreditAttribution: chrissearle commentedRe-issued patch against latest CVS (no changes - just making sure it still behaves with latest version).
Comment #16
chrissearle CreditAttribution: chrissearle commentedNew patch - this time with install file (for clearing cache at update)
Comment #17
scott859 CreditAttribution: scott859 commented@chrissearle,
Thanks so much for working on this, that patch does solve the cache issue.
Scott
Comment #18
Bèr Kessels CreditAttribution: Bèr Kessels commentedpatch committed to HEAD and Drupal-6
Comment #19
netentropy CreditAttribution: netentropy commenteddo you still have to run cron to get it to update?
Comment #20
chrissearle CreditAttribution: chrissearle commentedYes - this is just a fix to the caching mechanism so that updates actually apply when cron runs (or rather - that cron actually clears out the cached values so that they get rebuilt on the next display).