Guest User

Untitled

a guest
Nov 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Mage::app()->cleanCache()
  2.  
  3. Mage::app()->getCacheInstance()->flush();
  4.  
  5. $tags = Mage::app()->getCacheInstance()->cleanType($type);
  6. Mage::dispatchEvent('adminhtml_cache_refresh_type', array('type' => $type));
  7. $updatedTypes++;
  8.  
  9. <?php
  10.  
  11. require_once './app/Mage.php';
  12. umask(0);
  13. Mage::app('default');
  14. Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
  15.  
  16. try {
  17. $allTypes = Mage::app()->useCache();
  18. foreach($allTypes as $type => $value) {
  19. Mage::app()->getCacheInstance()->cleanType($type);
  20. Mage::dispatchEvent('adminhtml_cache_refresh_type', array('type' => $type));
  21. echo "{$type} </br>";
  22. }
  23. echo 'done';
  24. } catch (Exception $e) {
  25. echo $e->getMessage();
  26. }
  27.  
  28. Mage::app()->getCacheInstance()->flush();
Add Comment
Please, Sign In to add comment