View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003330 | OXID eShop (all versions) | 4. ------ eShop Core ------- | public | 2011-10-25 10:21 | 2012-12-10 13:42 |
Reporter | arvydas_vapsva | Assigned To | |||
Priority | urgent | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.5.4 revision 39463 | ||||
Target Version | 4.5.4 revision 39463 | Fixed in Version | 4.5.10 revision 44222 | ||
Summary | 0003330: Some code/queries can be optimized | ||||
Description | Some code/queries can be optimized: - oxArticle::_hasAnyVariant() - if product from same shop as active - do not query DB for variant count, use "oxvarcount" field value; - oxConfig::getShopConfVar() - if requested variable for same shop as active in session - call oxConfig::getConfigParam() instead of querying db; - oxSeoEncoder::_loadFromDb() - implement per view cache (non admin) to avoid unnecessary DB queries. Cache must be reset on related data changes. Thus will be saved hundred of queries; - oxVatSelector::_getVatForArticleCategory() - add cache for category id select, thus will be saved additional 19 or so queries per list view; | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
EE oxSuperCfg::getRights() is now: $iMode = (int) $this->getConfig()->getConfigParam( 'blUseRightsRoles' ); if ( $iMode && self::$_oRights == null ) { if ( $this->isAdmin() && ( $iMode & 1 ) ) { // checking if back-end RR control is on self::$_oRights = oxNew ( 'oxadminrights' ); self::$_oRights->load(); } elseif ( !$this->isAdmin() && $iMode & 2 ) { // checking if front-end RR control is on self::$_oRights = oxNew ( 'oxrights' ); self::$_oRights->load(); } } could be: $iMode = (int) $this->getConfig()->getConfigParam( 'blUseRightsRoles' ); if ( $iMode && self::$_oRights === null ) { self::$_oRights = false; if ( $this->isAdmin() && ( $iMode & 1 ) ) { // checking if back-end RR control is on self::$_oRights = oxNew ( 'oxadminrights' ); self::$_oRights->load(); } elseif ( !$this->isAdmin() && $iMode & 2 ) { if ( oxDb::getDb()->getOne( "select 1 from oxobjectrights" ) ) { // checking if front-end RR control is on self::$_oRights = oxNew ( 'oxrights' ); self::$_oRights->load(); } } } |
|
According to this German blog post http://www.shoptimax.de/blog/technisches/seo-cachefiles-im-tmp-ordner/ the bug was fixed by caching the database queries to /tmp/ folder. This cannot be the correct way as loads of files will be generated which can become relevant on hosted web space and for I/O performance. Please find another solution. |
|
added shop config option to enable disable seo cache |