Index: branches/5.2.x/core/kernel/managers/cache_manager.php =================================================================== diff -u -N -r16513 -r16664 --- branches/5.2.x/core/kernel/managers/cache_manager.php (.../cache_manager.php) (revision 16513) +++ branches/5.2.x/core/kernel/managers/cache_manager.php (.../cache_manager.php) (revision 16664) @@ -1,6 +1,6 @@ setCache($serial_name, (int)$this->getCache($serial_name) + 1); if (!defined('IS_INSTALL') || !IS_INSTALL) { - // delete cached mod-rewrite urls related to given prefix and id - $delete_clause = isset($id) ? $prefix . ':' . $id : $prefix; + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { + $prefixes = $this->Application->getCache('cached_urls_unit_prefixes'); + } + else { + $prefixes = $this->Application->getDBCache('cached_urls_unit_prefixes'); - $sql = 'DELETE FROM ' . TABLE_PREFIX . 'CachedUrls - WHERE Prefixes LIKE ' . $this->Conn->qstr('%|' . $delete_clause . '|%'); - $this->Conn->Query($sql); + if ( $prefixes !== false ) { + $prefixes = unserialize($prefixes); + } + } + + if ( !$prefixes ) { + $prefixes = array('c', 'lang', 'theme'); + } + + if ( in_array($prefix, $prefixes) ) { + // delete cached mod-rewrite urls related to given prefix and id + $delete_clause = isset($id) ? $prefix . ':' . $id : $prefix; + + $sql = 'DELETE FROM ' . TABLE_PREFIX . 'CachedUrls + WHERE Prefixes LIKE ' . $this->Conn->qstr('%|' . $delete_clause . '|%'); + $this->Conn->Query($sql); + } } }