Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Boxes cache and none empty $SID


Casa

Recommended Posts

Posted

Something I dont understand in 2.2MS2 is the cache of manufacturers and categories boxes:

we have in the code:

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'categories.php');

}

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_manufacturers_box();

} else {

include(DIR_WS_BOXES . 'manufacturers.php');

}

 

that means that cache is used only if $SID is empty !

But in my installation $SID is never empty!!! So any cache is used!

At first in application_top.php we have:

 

// set SID once, even if empty

$SID = (defined('SID') ? SID : '');

 

Is empty a string whose length=0? I don't think so.

And as soon as session are used, $SID is filled.

So it seems to me that the $SID is never empty! so never cache!

 

My question is why this double condition to use cache (USE_CACHE) and SID empty?

Could we not only have in the code:

 

if (USE_CACHE == 'true') {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'categories.php');

}

 

What is the impact of $SID in the cache?

 

Thanks for your help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...