delete cache by name in cache_lite
lets assume i have these variables saved in cache_lite :
article_1_0
article_1_1 article_3_2 article_3_3 article_2_4How can i delete all cached variables that starts with article_3_ (they can reach up to 10000) ?
or i开发者_JS百科n other words , how can i list the cached variables ??
Try to save your cache_lite variables by specifying group value then try to clean it in by specifying that group value i.e:
$cache->save($dataarticle_1_0,"article_1_0","article_1");
$cache->save($dataarticle_1_1,"article_1_1","article_1");
$cache->save($dataarticle_3_2,"article_3_2","article_3");
$cache->save($dataarticle_3_3,"article_3_3","article_3");
$cache->save($dataarticle_2_4,"article_2_4","article_2");
Then to delete all cached variables that starts with article_3_ you can do this way
$cache->clean("article_3");
Hope this is the solution
精彩评论