The current implementation (D5-branch) of caching using the FILE-engine does not provide a solution for wildcards in cache_clear_all();

Problem:
All $keys are stored as there md5-counterpart:

ex: content:160137:160831  
=> stored as fffe5d13a598d9952eafc0bf1b64ba7d  

This way we can not find any 'related' keys when cache_clear_all() request the deletion of "content:160137*"

Possible solution:
we should add some more information in the filename

ex: content:160137:160831  
=> stored as fffe5d13a598d9952eafc0bf1b64ba7d--content:160137:160831

file_scan_directory() can be used to find all cache-files that fall into the group "content:160137*".

This issue is related to #279152

My patch is in attachment. It adds the current $key to the end of the md5 cache-filename; and it searches for all the files when cache_clear_all() is called with wirldcard=TRUE.

CommentFileSizeAuthor
#1 patch_cacherouter_file_288318.patch2.35 KBJo Wouters

Comments

Jo Wouters’s picture

StatusFileSize
new2.35 KB

patch in attachment.

Note:
Make sure to also apply patch #266532: CACHE_PERMENANT should be CACHE_PERMANENT (this is an issue for D5 too)

slantview’s picture

Status: Needs review » Fixed

Thanks Jo. Got this committed to both DRUPAL-5 and DRUPAL-6--1 branches.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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