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 ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joewang’s picture

I have this same issue with 6.x-1.0. I guess I just have to change that line for right now.

chrissearle’s picture

FileSize
600 bytes

Patch for the 6.x branch attached.

joewang’s picture

Status: Active » Reviewed & tested by the community
2createwdrupal’s picture

I tried that patch. Tagadelic still didn't update. puzzling - before it would if I clicked the module, but now, nothing makes it update.

chrissearle’s picture

At what point did it not update? The patch has only to do with cache handling at cron time.

2createwdrupal’s picture

I 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

2createwdrupal’s picture

Title: Cache never updated? » Cache never updated? in Tagadelic

I 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

sirio81’s picture

Priority: Normal » Critical
Status: Reviewed & tested by the community » Needs work

Hi 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?

chrissearle’s picture

For 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.

2createwdrupal’s picture

Title: Cache never updated? in Tagadelic » updating Tagadelic in blocks

Hi @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

sirio81’s picture

I 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.

chrissearle’s picture

Status: Needs work » Needs review

As 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?

2createwdrupal’s picture

Tagadelic 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!

chrissearle’s picture

2createwdrupal - 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) ;)

chrissearle’s picture

FileSize
600 bytes

Re-issued patch against latest CVS (no changes - just making sure it still behaves with latest version).

chrissearle’s picture

New patch - this time with install file (for clearing cache at update)

scott859’s picture

@chrissearle,

Thanks so much for working on this, that patch does solve the cache issue.

Scott

Bèr Kessels’s picture

Category: support » bug
Priority: Critical » Normal
Status: Needs review » Fixed

patch committed to HEAD and Drupal-6

netentropy’s picture

do you still have to run cron to get it to update?

chrissearle’s picture

Yes - 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).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.