RESOLUTION BELOW...
It appears caches are being accessed despite enabling Developer Mode under Administration and disabling caching in both config.php and config_override.php ($sugar_config['external_cache_disabled'] => true; is effectively set in both).
I saw this in the log with DEBUG enabled:
Code:
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCachesMash
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCacheZend
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCacheWincache
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCacheRedis
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCacheMemory
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Using cache backend SugarCacheMemory, since 999 is less than 1000
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCacheMemcached
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCacheMemcache
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Using cache backend SugarCacheMemcache, since 900 is less than 999
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCacheFile
Thu Oct 6 13:50:55 2011 [6540][-none-][DEBUG] Found cache backend SugarCacheAPC
For some reason it is still using SugarCacheMemory and SugarCacheMemcache.
In Sugar's include/SugarCache/ folder, I modified the following three files to override any ability to cache by appending a '9' to its priority value.
SugarCacheAbstract.php
SugarCacheMemory.php
SugarCacheMemcache.php
I'm sure there is a more sane way to achieve this however this is what worked for me to confirm the specific cause.
After more trial and error, I found the issue to occur specifically with SugarCacheMemcache.php when using its default priority. Its (incorrect) content is being displayed.
SUCCESS: Restarting the Memcache daemon appears to have fixed the problem.
I previously set up Memcache on the same machine for caching other web applications and I wasn't aware it was being used by Sugar until now. I'm not sure why it wasn't flushing this cached data as it should have expired ages ago; it could have been a Sugar or Memcache issue.
In addition, after looking at SugarCacheMemcache.php, it appears to NOT look at external_cache_disabled but only external_cache_disabled_memcache (not even Developer Mode prevents stops it from running?).
Code:
public function useBackend()
{
if ( extension_loaded('memcache')
&& empty($GLOBALS['sugar_config']['external_cache_disabled_memcache'])
&& $this->_getMemcacheObject() )
return true;
return false;
} I was under this impression due to it being mentioned on various sites:
http://www.sugarcrm.com/forums/f148/...sed-crm-68434/
http://www.sugarcrm.com/forums/f6/de...e-5-0-a-31368/
How to avoid SugarCRM External Cache Warnings?.|.Joćo Morais
http://www.sugarcrm.com/forums/f115/...nt-save-37439/
thcGroup Log System » How to disable the cache usage in SugarCRM
It's interesting as to why it was functioning properly under 5.2.0 yet not after upgrading to 6.2.x.
If I run into any more oddities I will disable Sugar's Memcache support by setting $sugar_config['external_cache_disabled_memcache'] to true.
Many thanks for your help!
EDIT: Just noticed that Memcache is still storing older values and doesn't clear them until its daemon is restarted.
I have spotted an inconsistency in the SugarCache*.php files - SugarCacheMemcache.php (and all other files except SugarCacheAbstract.php).
In function _setExternal, there is a reference to $this->expireTimeout however this variable is never defined (in extended class SugarCacheAbstract, it is named $_expireTimeout which should be referenced to as $this->_expireTimeout) therefore defaulting to a value of 0 which means cache indefinitely.
I can see this "bug" is introduced in file SugarPro-Upgrade-6.1.x-to-6.2.1.zip. I have downloaded and checked SugarPro-Full-6.2.3.zip and SugarPro-6.3.0RC2.zip and it's still present.
I have raised a bug regarding the above. I hope it's not a duplicate...
Bookmarks