2 Edit: (Don't have enough reputation to comment)
source | link

Last night I was in the process of launching an upgraded Magento site but ran into caching problems which ultimately caused me to postpone the launch.

My setup:

  • New site (1.9): new.domain.com -> no cache
  • Old site (1.7): domain.com -> memcache/redis/fpc

Both sites are on the same server in folders corresponding to their domain name

My process:

  1. Rename folder domain.com to domain.com.backup
  2. Rename folder new.domain.com to domain.com
  3. Create maintenance.flag
  4. Update .htaccess file to use domain.com instead of new.domain.com
  5. Rename /app/etc/local.xml to /app/etc/local.xml.backup
  6. Rename /var/cache to /var/cache.backup
  7. Rename /var/session to /var/session.backup
  8. Flush Magento cache, memcache and redis

At this point, I'm hoping to refresh the page and get the Magento installation page so I can upgrade the live database (after backing up of course). However, I received an error message about failing to open a stream in a PHP file at new.domain.com.

So the base URL of new.domain.com must have been cached by the Magento configuration but there was no way for me to clear it. Anyways, after several hours of trial and error I finally came up with a pretty ridiculous solution.

All I need to do when moving the site between domains is simply update the app/Mage.php file (e.g. download and reupload). No actual change to the file source is needed.

Now to my main question. Why does updating the Mage.php file seemingly result in the clearing of the Magento configuration cache?

@John

Thanks for the comment. I did suspect that the cache was invalidating due to the timestamp change to that file. I cleared the var/cache folder by renaming it but this had no effect since I'm using memcache instead of the file system for the standard Magento cache management.

It would seem that just simply using the Flush Magento Cache and Flush Cache Storage buttons do not actually cause the memcached configuration to be refreshed (along with flushing it from the command line). Updating Mage.php is the only thing that seems to trigger the refresh.

Last night I was in the process of launching an upgraded Magento site but ran into caching problems which ultimately caused me to postpone the launch.

My setup:

  • New site (1.9): new.domain.com -> no cache
  • Old site (1.7): domain.com -> memcache/redis/fpc

Both sites are on the same server in folders corresponding to their domain name

My process:

  1. Rename folder domain.com to domain.com.backup
  2. Rename folder new.domain.com to domain.com
  3. Create maintenance.flag
  4. Update .htaccess file to use domain.com instead of new.domain.com
  5. Rename /app/etc/local.xml to /app/etc/local.xml.backup
  6. Rename /var/cache to /var/cache.backup
  7. Rename /var/session to /var/session.backup
  8. Flush Magento cache, memcache and redis

At this point, I'm hoping to refresh the page and get the Magento installation page so I can upgrade the live database (after backing up of course). However, I received an error message about failing to open a stream in a PHP file at new.domain.com.

So the base URL of new.domain.com must have been cached by the Magento configuration but there was no way for me to clear it. Anyways, after several hours of trial and error I finally came up with a pretty ridiculous solution.

All I need to do when moving the site between domains is simply update the app/Mage.php file (e.g. download and reupload). No actual change to the file source is needed.

Now to my main question. Why does updating the Mage.php file seemingly result in the clearing of the Magento configuration cache?

Last night I was in the process of launching an upgraded Magento site but ran into caching problems which ultimately caused me to postpone the launch.

My setup:

  • New site (1.9): new.domain.com -> no cache
  • Old site (1.7): domain.com -> memcache/redis/fpc

Both sites are on the same server in folders corresponding to their domain name

My process:

  1. Rename folder domain.com to domain.com.backup
  2. Rename folder new.domain.com to domain.com
  3. Create maintenance.flag
  4. Update .htaccess file to use domain.com instead of new.domain.com
  5. Rename /app/etc/local.xml to /app/etc/local.xml.backup
  6. Rename /var/cache to /var/cache.backup
  7. Rename /var/session to /var/session.backup
  8. Flush Magento cache, memcache and redis

At this point, I'm hoping to refresh the page and get the Magento installation page so I can upgrade the live database (after backing up of course). However, I received an error message about failing to open a stream in a PHP file at new.domain.com.

So the base URL of new.domain.com must have been cached by the Magento configuration but there was no way for me to clear it. Anyways, after several hours of trial and error I finally came up with a pretty ridiculous solution.

All I need to do when moving the site between domains is simply update the app/Mage.php file (e.g. download and reupload). No actual change to the file source is needed.

Now to my main question. Why does updating the Mage.php file seemingly result in the clearing of the Magento configuration cache?

@John

Thanks for the comment. I did suspect that the cache was invalidating due to the timestamp change to that file. I cleared the var/cache folder by renaming it but this had no effect since I'm using memcache instead of the file system for the standard Magento cache management.

It would seem that just simply using the Flush Magento Cache and Flush Cache Storage buttons do not actually cause the memcached configuration to be refreshed (along with flushing it from the command line). Updating Mage.php is the only thing that seems to trigger the refresh.

1
source | link

Updating the file app/Mage.php clears my cache and solves redirect problem. Why?

Last night I was in the process of launching an upgraded Magento site but ran into caching problems which ultimately caused me to postpone the launch.

My setup:

  • New site (1.9): new.domain.com -> no cache
  • Old site (1.7): domain.com -> memcache/redis/fpc

Both sites are on the same server in folders corresponding to their domain name

My process:

  1. Rename folder domain.com to domain.com.backup
  2. Rename folder new.domain.com to domain.com
  3. Create maintenance.flag
  4. Update .htaccess file to use domain.com instead of new.domain.com
  5. Rename /app/etc/local.xml to /app/etc/local.xml.backup
  6. Rename /var/cache to /var/cache.backup
  7. Rename /var/session to /var/session.backup
  8. Flush Magento cache, memcache and redis

At this point, I'm hoping to refresh the page and get the Magento installation page so I can upgrade the live database (after backing up of course). However, I received an error message about failing to open a stream in a PHP file at new.domain.com.

So the base URL of new.domain.com must have been cached by the Magento configuration but there was no way for me to clear it. Anyways, after several hours of trial and error I finally came up with a pretty ridiculous solution.

All I need to do when moving the site between domains is simply update the app/Mage.php file (e.g. download and reupload). No actual change to the file source is needed.

Now to my main question. Why does updating the Mage.php file seemingly result in the clearing of the Magento configuration cache?